Page MenuHomeFreeBSD

Schedule link address update when vlan's parent interface is changed
ClosedPublic

Authored by ae on Nov 5 2019, 4:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 3:45 AM
Unknown Object (File)
Dec 9 2023, 3:05 PM
Unknown Object (File)
Nov 30 2023, 9:14 AM
Unknown Object (File)
Nov 10 2023, 12:16 PM
Unknown Object (File)
Nov 8 2023, 12:20 PM
Unknown Object (File)
Nov 7 2023, 9:17 AM
Unknown Object (File)
Nov 6 2023, 4:03 PM
Unknown Object (File)
Nov 6 2023, 8:42 AM
Subscribers

Details

Summary

We discovered the problem: when vlan's parent interface is changed, vlans still use old link layer address since vlan_lladdr_fn is not executed.

This patch adds the check and enqueues lladdr_task if L2 address is different.

This is how to reproduce:

# ifconfig vlan1 create vlandev mce3 vlan 1
# ifconfig vlan1 inet 10.0.0.1/24
# ifconfig vlan1 inet6 fc00::1
# (ndp -an; arp -an) | grep vlan1
# ifconfig vlan1 -vlandev
# ifconfig vlan1 vlandev ix1 vlan1
# (ndp -an; arp -an) | grep vlan1

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27371
Build 25620: arc lint + arc unit

Event Timeline

If copying the LL addr is happening every time a parent interface is added (bcopy) , why not schedule the update too unconditionally?
It will only happen on changing the parent interface anyway.

In D22243#486266, @lutz_donnerhacke.de wrote:

If copying the LL addr is happening every time a parent interface is added (bcopy) , why not schedule the update too unconditionally?
It will only happen on changing the parent interface anyway.

Yes, we can do it unconditionally. I just tried to avoid extra work (updating of each llentry), that can be done in case when interface has tens or hundreds of addresses.

I just tried to avoid extra work (updating of each llentry), that can be done in case when interface has tens or hundreds of addresses.

Then please skip the bcopy, too. Otherwise it looks inconsistent.
if(!memcmp(...)) { bcopy(); schedule_update(); }

Make address copying also conditional for consistency.
Add comment describing the goal of condition.

Okay from me.
Now you need to find some of the senior developers to approve and commit it.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 7 2019, 3:00 PM
This revision was automatically updated to reflect the committed changes.