Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates re unicast_src_ip #2515

Merged
merged 4 commits into from
Dec 9, 2024
Merged

Updates re unicast_src_ip #2515

merged 4 commits into from
Dec 9, 2024

Conversation

pqarmitage
Copy link
Collaborator

Fix segfault if unicast_src_ip is not configured on interface, and allow bind() to work when address in not configured on interface.

If a unicast VRRP instance is configured and the unicast_src_ip does
not exist on the system, then the bind() fails and the sockets are not
opened. This commit ensures that in that case vrrp->sockets is not
dereferenced.

This is not a real fix to the problem. We need to track the addition
and removal of unicast_src_ip addresses, and enter fault state if the
address in not configured, or when it is removed.

Signed-off-by: Quentin Armitage <[email protected]>
If the interface is not configured, we can't know what interface to
add the VMAC to.

Signed-off-by: Quentin Armitage <[email protected]>
Commit 0400738 - "vrrp: don't allow unicast instance without interface
to have a VMAC" caused keepalived to fail to compile if VMACs were not
enabled.
This allows creating and configuring unicast sockets before the configured
source address is added to the system.

Signed-off-by: Quentin Armitage <[email protected]>
@pqarmitage pqarmitage merged commit 91baa39 into acassen:master Dec 9, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant