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)
Oct 3 2024, 7:23 AM
Unknown Object (File)
Oct 2 2024, 4:33 PM
Unknown Object (File)
Sep 26 2024, 8:52 PM
Unknown Object (File)
Sep 24 2024, 8:59 AM
Unknown Object (File)
Sep 6 2024, 4:11 PM
Unknown Object (File)
Sep 5 2024, 9:31 AM
Unknown Object (File)
Sep 4 2024, 11:40 AM
Unknown Object (File)
Sep 4 2024, 11:40 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 Not Applicable
Unit
Tests Not Applicable

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.