Bug 203573 - wlan0 leaves arp entries that can only be cleared by reboot
Summary: wlan0 leaves arp entries that can only be cleared by reboot
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexander V. Chernikov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-10-06 07:21 UTC by Poul-Henning Kamp
Modified: 2015-12-03 06:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Poul-Henning Kamp freebsd_committer freebsd_triage 2015-10-06 07:21:54 UTC
When wlan0 interface on recent -current is down'ed a stale arp entry is left behind which cannot be removed by any means short of reboot.

Seen on: base r287959 and base r288823 amd64.

critter phk> ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 60:67:20:b6:fd:38
        inet 192.168.60.199 netmask 0xffffff00 broadcast 192.168.60.255 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet MCS mode 11na
        status: associated
        ssid freebsd channel 40 (5200 MHz 11a ht/40-) bssid 14:cc:20:85:92:4f
        country US authmode WPA2/802.11i privacy ON deftxkey UNDEF
        TKIP 3:128-bit txpower 14 bmiss 10 mcastrate 6 mgmtrate 6 scanvalid 60
        ampdulimit 64k ampdudensity 8 -amsdutx amsdurx shortgi wme
        roaming MANUAL
        groups: wlan 

root@critter:~ # ifconfig wlan0 down delete
root@critter:~ # ifconfig wlan0 down delete
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address

root@critter:~ # arp -a
? (192.168.60.199) at 60:67:20:b6:fd:38 on wlan0 permanent [ethernet]
root@critter:~ # netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
127.0.0.1          link#2             UH          lo0

Internet6:
Destination                       Gateway                       Flags     Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               link#2                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%lo0/64                     link#2                        U           lo0
fe80::1%lo0                       link#2                        UHS         lo0
ff02::/16                         ::1                           UGRS        lo0
root@critter:~ # netstat -in
Name    Mtu Network       Address              Ipkts Ierrs Idrop    Opkts Oerrs  Coll
 em0*  1500 <Link#1>                           0     0     0        0     0     0
  lo0 16384 <Link#2>                                           496     0     0      496     0     0
  lo0     - ::1/128       ::1                      0     -     -        0     -     -
  lo0     - fe80::1%lo0/6 fe80::1%lo0              0     -     -        0     -     -
  lo0     - 127.0.0.0/8   127.0.0.1              496     -     -      496     -     -
wlan0  1500 <Link#3>           127.0.0.1      51     0     0       41     6     0
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-10-18 12:27:07 UTC
A commit references this bug:

Author: melifaro
Date: Sun Oct 18 12:26:25 UTC 2015
New revision: 289501
URL: https://svnweb.freebsd.org/changeset/base/289501

Log:
  Fix deletion of ifaddr lle entries when deleting prefix from interface in
    down state.

  Regression appeared in r287789, where the "prefix has no corresponding
    installed route" case was forgotten. Additionally, lltable_delete_addr()
    was called with incorrect byte order (default is network for lltable code).
  While here, improve comments on given cases and byte order.

  PR:		203573
  Submitted by:	phk

Changes:
  head/sys/netinet/in.c