-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[201803] [radvd] Build radvd from source; Patch so as not to treat ou…
…t-of-range MTU as an error (#2552) * Build radvd from source and patch to ignore out-of-range MTU size * Add comments to radvd patch, remove line instead of commenting it out
- Loading branch information
Showing
7 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# radvd package | ||
|
||
RADVD_VERSION = 1.9.1-1.3 | ||
|
||
export RADVD_VERSION | ||
|
||
RADVD = radvd_$(RADVD_VERSION)_amd64.deb | ||
$(RADVD)_SRC_PATH = $(SRC_PATH)/radvd | ||
SONIC_MAKE_DEBS += $(RADVD) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET = radvd_$(RADVD_VERSION)_amd64.deb | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
# Remove any stale files | ||
rm -rf ./radvd | ||
|
||
# Clone radvd repo | ||
git clone https://salsa.debian.org/debian/radvd.git | ||
pushd ./radvd | ||
|
||
# Reset HEAD to the commit of the proper tag | ||
# NOTE: Using "git checkout <tag_name>" here detaches our HEAD, | ||
# which stg doesn't like, so we use this method instead | ||
# NOTE: For some reason, tags in the Debian radvd repo are prefixed with "1%" | ||
git reset --hard debian/1\%$(RADVD_VERSION) | ||
|
||
# Apply patches | ||
stg init | ||
stg import -s ../patch/series | ||
|
||
# Build source and Debian packages | ||
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) | ||
popd | ||
|
||
# Move the newly-built .deb packages to the destination directory | ||
mv $* $(DERIVED_TARGETS) $(DEST)/ |
33 changes: 33 additions & 0 deletions
33
src/radvd/patch/0001-Don-t-treat-out-of-range-MTU-as-an-error.patch
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From e5af09b187bcce4e48ea3f1f71b81329e2d91ea4 Mon Sep 17 00:00:00 2001 | ||
From: Joe LeVeque <[email protected]> | ||
Date: Tue, 12 Feb 2019 19:13:45 +0000 | ||
Subject: [PATCH] Don't treat out-of-range MTU as an error | ||
|
||
--- | ||
interface.c | 9 +++++++-- | ||
1 file changed, 7 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/interface.c b/interface.c | ||
index d17267e..b59c6e8 100644 | ||
--- a/interface.c | ||
+++ b/interface.c | ||
@@ -158,9 +158,14 @@ check_iface(struct Interface *iface) | ||
((iface->AdvLinkMTU < MIN_AdvLinkMTU) || | ||
(iface->if_maxmtu != -1 && (iface->AdvLinkMTU > iface->if_maxmtu)))) | ||
{ | ||
- flog(LOG_ERR, "AdvLinkMTU for %s (%u) must be zero or between %u and %u", | ||
+ // FIXME: Temporary workaround for SONiC. Currently, when interfaces are added | ||
+ // or removed from VLANs, the kernel sets the MTU size for the VLAN to the | ||
+ // default value of 1500. Here, we prevent radvd from treating a larger value | ||
+ // in its configuration as an error. Instead of logging an error and setting | ||
+ // res to -1, we simply log a warning and continue on. Once the aforementioned | ||
+ // behavior is addressed, this patch should be removed. | ||
+ flog(LOG_WARNING, "AdvLinkMTU for %s (%u) must be zero or between %u and %u", | ||
iface->Name, iface->AdvLinkMTU, MIN_AdvLinkMTU, iface->if_maxmtu); | ||
- res = -1; | ||
} | ||
|
||
if (iface->AdvReachableTime > MAX_AdvReachableTime) | ||
-- | ||
2.17.1 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This series applies on GIT commit 3ab9ce1f298cec3600fdad0a4000c1b1351562fd | ||
0001-Don-t-treat-out-of-range-MTU-as-an-error.patch |