Bug 168245

Summary: [arp] [regression] Permanent ARP entry not deleted on interface configuration failure
Product: Base System Reporter: Arnaud <lacombar>
Component: kernAssignee: Alexander V. Chernikov <melifaro>
Status: Open ---    
Severity: Affects Only Me CC: melifaro
Priority: Normal    
Version: 9.0-RELEASE   
Hardware: Any   
OS: Any   

Description Arnaud 2012-05-23 03:10:15 UTC
Permanent ARP entry not deleted on interface configuration failure. Older FreeBSD (ie. 7.1) does not show this bug.

How-To-Repeat: # ifconfig vr0 172.31.0.1
# route delete 172.31.0.1
delete host 172.31.0.1
# route delete 172.31.0.0/16
delete net 172.31.0.0
# route add 172.31.0.1 -iface vr1
add host 172.31.0.1: gateway vr1
# ifconfig vr0 delete 172.31.0.1

At this point, only the route to 172.31.0.1 exist, ARP for 172.31.0.1 has been cleared.

# ifconfig vr0 172.31.0.1
ifconfig: ioctl (SIOCAIFADDR): File exists

The stale route entry cause the configuration to fail, leading to:

# ifconfig vr0
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8280b<RXCSUM,TXCSUM,VLAN_MTU,WOL_UCAST,WOL_MAGIC,LINKSTATE>
        ether 00:00:24:cb:f4:90
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active

this is expected, however:

# arp -a
[...]
? (172.31.0.1) at 00:00:24:cb:f4:90 on vr0 permanent [ethernet]

This should have been cleared while returning from the configuration path.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-06-08 05:59:39 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:46:32 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.