-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
zebra: fix crash when macvlan link-interface is in another netns #15399
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ci:rerun |
A macvlan interface can have its underlying link-interface in another namespace (aka. netns). However, by default, zebra does not know the interface from the other namespaces. It results in a crash the pointer to the link interface is NULL. > 6 0x0000559d77a329d3 in zebra_vxlan_macvlan_up (ifp=0x559d798b8e00) at /root/frr/zebra/zebra_vxlan.c:4676 > 4676 link_zif = link_ifp->info; > (gdb) list > 4671 struct interface *link_ifp, *link_if; > 4672 > 4673 zif = ifp->info; > 4674 assert(zif); > 4675 link_ifp = zif->link; > 4676 link_zif = link_ifp->info; > 4677 assert(link_zif); > 4678 > (gdb) p zif->link > $2 = (struct interface *) 0x0 > (gdb) p zif->link_ifindex > $3 = 15 Fix the crash by returning when the macvlan link-interface is in another namespace. No need to go further because any vxlan under the macvlan interface would not be accessible by zebra. Link: FRRouting#15370 Signed-off-by: Louis Scalbert <[email protected]>
louis-6wind
force-pushed
the
fix-macvlan-crash
branch
from
February 21, 2024 14:50
7861f4f
to
44e6e38
Compare
louis-6wind
changed the title
zebra: fix crash if macvlan link-interface invalid
zebra: fix crash if macvlan link in another netns
Feb 21, 2024
louis-6wind
changed the title
zebra: fix crash if macvlan link in another netns
zebra: fix crash when macvlan link-interface is in another netns
Feb 21, 2024
ci:rerun |
@Mergifyio backport dev/10.0 stable/9.1 stable/9.0 stable/8.5 |
✅ Backports have been created
|
This was referenced Feb 27, 2024
riw777
added a commit
that referenced
this pull request
Feb 27, 2024
zebra: fix crash when macvlan link-interface is in another netns (backport #15399)
riw777
added a commit
that referenced
this pull request
Feb 27, 2024
zebra: fix crash when macvlan link-interface is in another netns (backport #15399)
riw777
added a commit
that referenced
this pull request
Feb 27, 2024
zebra: fix crash when macvlan link-interface is in another netns (backport #15399)
riw777
added a commit
that referenced
this pull request
Feb 27, 2024
zebra: fix crash when macvlan link-interface is in another netns (backport #15399)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A macvlan interface can have its underlying link-interface in another
namespace (aka. netns). However, by default, zebra does not know the
interface from the other namespaces. It results in a crash the pointer
to the link interface is NULL.
Fix the crash by returning when the macvlan link-interface is in another
namespace. No need to go further because any vxlan under the macvlan
interface would not be accessible by zebra.
Closes #15370