Bug 145300

Summary: [arp] ARP table mapping is not refreshed on a MAC address change
Product: Base System Reporter: Boris Astardzhiev <boris_astardzhiev>
Component: kernAssignee: Qing Li <qingli>
Status: Open ---    
Severity: Affects Only Me CC: gleb.kurtsou
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Boris Astardzhiev 2010-04-02 18:00:13 UTC
On changing a link layer (MAC) address of a network interface that has an AF_INET address family applied to it the ARP table remains untouched reporting that the AF_INET address family is still mapped to the previous MAC address. An ARP table flush does not solve the problem.

Fix: A patch is applied.

Patch attached with submission follows:
How-To-Repeat: Here's a walk-through regarding the specified problem.

boris-fbsd# ifconfig em1
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
	ether 08:00:27:07:bb:b7
	inet 192.168.56.2 netmask 0xffffff00 broadcast 192.168.56.255
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active

boris-fbsd# arp -a -n
? (192.168.56.2) at 08:00:27:07:bb:b7 on em1 permanent [ethernet]

boris-fbsd# ifconfig em1 ether 11:22:33:44:55:66

boris-fbsd# ifconfig em1
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
	ether 11:22:33:44:55:66
	inet 192.168.56.2 netmask 0xffffff00 broadcast 192.168.56.255
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active

boris-fbsd# arp -a -n
? (192.168.56.2) at 08:00:27:07:bb:b7 on em1 permanent [ethernet]

boris-fbsd# arp -a -d
192.168.56.2 (192.168.56.2) deleted

boris-fbsd# arp -a -n
? (192.168.56.2) at 08:00:27:07:bb:b7 on em1 permanent [ethernet]

boris-fbsd# 

As you may have noticed the MAC address reported in the ARP table remains the old one though it's been changed.
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2010-04-03 10:06:11 UTC
Responsible Changed
From-To: freebsd-bugs->qingli

Qing, you worked on the l2/l3 rewrite, can this be part of that?
Comment 2 boris.astardzhiev 2010-07-24 12:39:21 UTC
This bug also applies to a freshly installed FreeBSD 8.1-RELEASE:

boris-fbsd81# uname -a
FreeBSD boris-fbsd81.smartcom.bg 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon 
Jul 19 02:55:53 UTC 2010 
root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
boris-fbsd81#
Comment 3 Alexander V. Chernikov freebsd_committer freebsd_triage 2015-10-17 12:38:04 UTC
*** Bug 152235 has been marked as a duplicate of this bug. ***
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:43:22 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.