-
Notifications
You must be signed in to change notification settings - Fork 24
Fix use-after-free when destroying interfaces on shutdown #439
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/bin/bash | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # Copyright (c) 2024 Robin Jarry | ||
|
|
||
| . $(dirname $0)/_init.sh | ||
|
|
||
| grcli -xe <<EOF | ||
| interface add port p0 devargs net_null0,no-rx=1 vrf 1 | ||
| interface add port p1 devargs net_null1,no-rx=1 vrf 2 | ||
| nexthop add l3 iface p0 id 42 address 1.2.3.4 | ||
| nexthop add l3 iface p0 id 45 | ||
| nexthop add l3 iface p0 id 47 address 1.2.3.7 | ||
| nexthop add l3 iface p1 id 1042 address f00:ba4::1 | ||
| nexthop add l3 iface p1 id 1047 address f00:ba4::100 | ||
| nexthop add l3 iface p0 address ba4:f00::1 mac ba:d0:ca:ca:00:02 | ||
| nexthop add l3 iface p1 address 4.3.2.1 mac ba:d0:ca:ca:00:01 | ||
| nexthop add blackhole id 666 vrf 1 | ||
| nexthop add reject id 123456 vrf 2 | ||
| address add 10.0.0.1/24 iface p0 | ||
| address add 10.1.0.1/24 iface p1 | ||
| route add 0.0.0.0/0 via 10.0.0.2 vrf 1 | ||
| route add 4.5.21.2/27 via id 47 vrf 1 | ||
| route add 172.16.47.0/24 via id 1047 vrf 2 | ||
| address add 2345::1/24 iface p0 | ||
| address add 2346::1/24 iface p1 | ||
| route add ::/0 via 2345::2 vrf 1 | ||
| route add 2521:111::4/37 via id 1047 vrf 1 | ||
| route add 2521:112::/64 via id 45 vrf 2 | ||
| route add 2521:113::/64 via id 47 vrf 1 | ||
| interface set port p0 rxqs 2 | ||
| interface set port p1 rxqs 2 | ||
| EOF | ||
|
|
||
| kill -INT "$grout_pid" | ||
| wait "$grout_pid" || fail "grout crashed on shutdown" | ||
|
|
||
| # grout has been shutdown, avoid running any grcli command | ||
| sed -i '/^grcli/d' $tmp/cleanup | ||
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.
Uh oh!
There was an error while loading. Please reload this page.