vrrp: fix persistent FAULT state with use_vmac on a down base interface #2277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the base interface of VMAC is down at startup, the VRRP instance will remain on FAULT state even if the base interface is set up.
Since the base interface is down, the VMAC operational state is also down and there is no operational IPv6 address. keepalived increments vrrp->num_script_if_fault. When the interface comes up, the link-local IPv6 address is set but vrrp->num_script_if_fault is not decremented. keepalived considers that there is still a remaining fault and keeps the VRRP instance in FAULT state.
Increment vrrp->num_script_if_fault when an IPv6 appears on the VMAC.
Fixes: 4c7a94a ("vrrp: Make VMAC IPv6 link local address mirror parent interface")