Properly take over configured IP addresses and routes on (first) attachment to bond and bridge interfaces.
Description
Currently the code does checks for ip and route configuration if it applies to interfaces linked to port interfaces, and ignores if it it doesn't. This makes sense at first, but breaks if the configuration might get added before port interfaces do get attached.
We do attempt to take over IP address configuration on bond interfaces, but miss configuration on linked vlan interfaces, and all configuration on bridge interfaces. Configured routes are completely ignored.
This PR attempts fixing the situation by expanding the code adding the ip addresses to also check all linked vlan interfaces, check the route cache for routes, and also call this on initial attachment to the bridge.
Motivation and Context
Currently IP configuration on vlan interfaces can get lost on the following order of network events:
create bridge
create SVI on top of bridge
add ip addresss to SVI
set bridge as master for port interfaces
At step three we will see that the brige has no port interfaces, so we ignore the IP address, but then at step 4 we don't scan the interface and add the IP address later.
So we need to be ready to take over the configuration on attachment.
Properly take over configured IP addresses and routes on (first) attachment to bond and bridge interfaces.
Description
Currently the code does checks for ip and route configuration if it applies to interfaces linked to port interfaces, and ignores if it it doesn't. This makes sense at first, but breaks if the configuration might get added before port interfaces do get attached.
We do attempt to take over IP address configuration on bond interfaces, but miss configuration on linked vlan interfaces, and all configuration on bridge interfaces. Configured routes are completely ignored.
This PR attempts fixing the situation by expanding the code adding the ip addresses to also check all linked vlan interfaces, check the route cache for routes, and also call this on initial attachment to the bridge.
Motivation and Context
Currently IP configuration on vlan interfaces can get lost on the following order of network events:
At step three we will see that the brige has no port interfaces, so we ignore the IP address, but then at step 4 we don't scan the interface and add the IP address later.
So we need to be ready to take over the configuration on attachment.
How Has This Been Tested?
A pipeline was run on Questone 2A