-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Frr 8.2 upgrade #10691
Frr 8.2 upgrade #10691
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
SPATH := $($(LIBYANG2)_SRC_PATH) | ||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/libyang2.mk rules/libyang2.dep | ||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
DEP_FILES += $(shell git ls-files $(SPATH)) | ||
|
||
$(LIBYANG2)_CACHE_MODE := GIT_CONTENT_SHA | ||
$(LIBYANG2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
$(LIBYANG2)_DEP_FILES := $(DEP_FILES) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# libyang2 | ||
|
||
LIBYANG2_VERSION_BASE = 2.0 | ||
LIBYANG2_VERSION = $(LIBYANG2_VERSION_BASE).112 | ||
LIBYANG2_SUBVERSION = 6 | ||
LIBYANG2_FULLVERSION = $(LIBYANG2_VERSION)-$(LIBYANG2_SUBVERSION) | ||
|
||
export LIBYANG2_VERSION_BASE | ||
export LIBYANG2_VERSION | ||
export LIBYANG2_SUBVERSION | ||
export LIBYANG2_FULLVERSION | ||
|
||
LIBYANG2 = libyang2_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(LIBYANG2)_SRC_PATH = $(SRC_PATH)/libyang2 | ||
SONIC_MAKE_DEBS += $(LIBYANG2) | ||
|
||
LIBYANG2_DEV = libyang2-dev_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_DEV))) | ||
|
||
LIBYANG2_DBG = libyang2-dbgsym_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_DBG))) | ||
|
||
LIBYANG2_CPP = libyang2-cpp1_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(LIBYANG2_CPP)_DEPENDS += $(LIBYANG2) | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_CPP))) | ||
|
||
LIBYANG2_CPP_DEV = libyang2-cpp-dev_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_CPP_DEV))) | ||
|
||
LIBYANG2_CPP_DBG = libyang2-cpp1-dbgsym_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_CPP_DBG))) | ||
|
||
YANG_TOOLS = yang-tools_$(LIBYANG2_FULLVERSION)_all.deb | ||
$(YANG_TOOLS)_DEPENDS += $(LIBYANG2) | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(YANG_TOOLS))) | ||
|
||
LIBYANG2_TOOLS = libyang2-tools_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_TOOLS))) | ||
|
||
LIBYANG2_TOOLS_DBG = libyang2-tools-dbgsym_$(LIBYANG2_FULLVERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(LIBYANG2),$(LIBYANG2_TOOLS_DBG))) | ||
|
||
export LIBYANG2 LIBYANG2_DBG LIBYANG2_DEV LIBYANG2_CPP LIBYANG2_CPP_DEV LIBYANG2_CPP_DBG YANG_TOOLS LIBYANG2_TOOLS LIBYANG2_TOOLS_DBG |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ RUN apt-get update && apt-get install -y \ | |
imagemagick \ | ||
ghostscript \ | ||
groff \ | ||
libpcre3-dev \ | ||
libpcre2-dev \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. libpcre2 is required by libyang2 when building buster. This dependency error is not seen in bullseye build, though. That's why the change only in buster. dpkg-source: info: extracting libyang2 in libyang2-2.0.112 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Btw, libpcre3 is already present at L#150 in the same file. |
||
gawk \ | ||
chrpath \ | ||
# For frr build | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!.gitignore | ||
!Makefile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
.SHELLFLAGS += -e | ||
|
||
LIBYANG_URL = https://sonicstorage.blob.core.windows.net/debian/pool/main/liby/libyang | ||
|
||
DSC_FILE = libyang2_$(LIBYANG2_FULLVERSION).dsc | ||
ORIG_FILE = libyang2_$(LIBYANG2_VERSION).orig.tar.gz | ||
DEBIAN_FILE = libyang2_$(LIBYANG2_FULLVERSION).debian.tar.xz | ||
|
||
DSC_FILE_URL = $(LIBYANG_URL)/$(DSC_FILE) | ||
ORIG_FILE_URL = $(LIBYANG_URL)/$(ORIG_FILE) | ||
DEBIAN_FILE_URL = $(LIBYANG_URL)/$(DEBIAN_FILE) | ||
|
||
MAIN_TARGET = $(LIBYANG2) | ||
DERIVED_TARGETS = $(LIBYANG2_DEV) $(LIBYANG2_DBG) $(LIBYANG2_TOOLS) $(LIBYANG2_TOOLS_DBG) | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
# Obtaining the libyang | ||
rm -fr ./libyang2-$(LIBYANG2_VERSION) | ||
|
||
# download debian libyang | ||
wget -NO "$(DSC_FILE)" $(DSC_FILE_URL) | ||
wget -NO "$(ORIG_FILE)" $(ORIG_FILE_URL) | ||
wget -NO "$(DEBIAN_FILE)" $(DEBIAN_FILE_URL) | ||
dpkg-source -x libyang2_$(LIBYANG2_FULLVERSION).dsc | ||
|
||
pushd libyang2-$(LIBYANG2_VERSION) | ||
#sed -i 's/set(LIBYANG_MAJOR_SOVERSION 1)/set(LIBYANG_MAJOR_SOVERSION 2)/' CMakeLists.txt | ||
#sed -i 's/libyang2/libyang2/' debian/libyang2.install | ||
# Enable large file support for 32-bit arch | ||
echo 'add_definitions(-D_FILE_OFFSET_BITS=64)' >> CMakeLists.txt | ||
|
||
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) | ||
popd | ||
|
||
# Move the newly-built .deb packages to the destination directory | ||
mv $* $(DERIVED_TARGETS) $(DEST)/ | ||
|
||
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
From 71415ae851357025a99b8ead7edf5755a55b6fbb Mon Sep 17 00:00:00 2001 | ||
From 4ab192df23362e64d1a11441fae82329388f103e Mon Sep 17 00:00:00 2001 | ||
From: Pavel Shirshov <[email protected]> | ||
Date: Mon, 16 Nov 2020 18:00:12 -0800 | ||
Subject: [PATCH 1/5] Add support of bgp tcp DSCP value | ||
Subject: [PATCH 1/8] Add support of bgp tcp DSCP value | ||
|
||
--- | ||
bgpd/bgp_network.c | 11 ++++------- | ||
bgpd/bgp_vty.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ | ||
bgpd/bgpd.c | 2 +- | ||
bgpd/bgpd.c | 1 + | ||
bgpd/bgpd.h | 3 +++ | ||
4 files changed, 52 insertions(+), 8 deletions(-) | ||
4 files changed, 52 insertions(+), 7 deletions(-) | ||
|
||
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c | ||
index cae11ae7b..f1d96664d 100644 | ||
index 3fb7619ed..70c771683 100644 | ||
--- a/bgpd/bgp_network.c | ||
+++ b/bgpd/bgp_network.c | ||
@@ -721,11 +721,9 @@ int bgp_connect(struct peer *peer) | ||
@@ -743,11 +743,9 @@ int bgp_connect(struct peer *peer) | ||
#ifdef IPTOS_PREC_INTERNETCONTROL | ||
frr_with_privs(&bgpd_privs) { | ||
if (sockunion_family(&peer->su) == AF_INET) | ||
|
@@ -28,7 +28,7 @@ index cae11ae7b..f1d96664d 100644 | |
} | ||
#endif | ||
|
||
@@ -801,10 +799,9 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen, | ||
@@ -824,10 +822,9 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen, | ||
|
||
#ifdef IPTOS_PREC_INTERNETCONTROL | ||
if (sa->sa_family == AF_INET) | ||
|
@@ -42,10 +42,10 @@ index cae11ae7b..f1d96664d 100644 | |
|
||
sockopt_v6only(sa->sa_family, sock); | ||
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c | ||
index bb2f89f9e..33662b08e 100644 | ||
index 4df2abef8..950d1d25c 100644 | ||
--- a/bgpd/bgp_vty.c | ||
+++ b/bgpd/bgp_vty.c | ||
@@ -1330,6 +1330,42 @@ DEFUN (no_router_bgp, | ||
@@ -1558,6 +1558,42 @@ DEFUN (no_router_bgp, | ||
return CMD_SUCCESS; | ||
} | ||
|
||
|
@@ -88,7 +88,7 @@ index bb2f89f9e..33662b08e 100644 | |
|
||
/* BGP router-id. */ | ||
|
||
@@ -15549,6 +15585,10 @@ int bgp_config_write(struct vty *vty) | ||
@@ -17053,6 +17089,10 @@ int bgp_config_write(struct vty *vty) | ||
if (CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER)) | ||
vty_out(vty, " no bgp fast-external-failover\n"); | ||
|
||
|
@@ -97,9 +97,9 @@ index bb2f89f9e..33662b08e 100644 | |
+ vty_out(vty, " bgp session-dscp %02X\n", bgp->tcp_dscp >> 2); | ||
+ | ||
/* BGP router ID. */ | ||
if (bgp->router_id_static.s_addr != 0) | ||
vty_out(vty, " bgp router-id %s\n", | ||
@@ -16057,6 +16097,10 @@ void bgp_vty_init(void) | ||
if (bgp->router_id_static.s_addr != INADDR_ANY) | ||
vty_out(vty, " bgp router-id %pI4\n", | ||
@@ -17662,6 +17702,10 @@ void bgp_vty_init(void) | ||
/* "no router bgp" commands. */ | ||
install_element(CONFIG_NODE, &no_router_bgp_cmd); | ||
|
||
|
@@ -111,32 +111,31 @@ index bb2f89f9e..33662b08e 100644 | |
install_element(BGP_NODE, &bgp_router_id_cmd); | ||
install_element(BGP_NODE, &no_bgp_router_id_cmd); | ||
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c | ||
index cf9ff038d..0e8579843 100644 | ||
index 7e528b219..005523544 100644 | ||
--- a/bgpd/bgpd.c | ||
+++ b/bgpd/bgpd.c | ||
@@ -3069,7 +3069,7 @@ static struct bgp *bgp_create(as_t *as, const char *name, | ||
|
||
@@ -3229,6 +3229,7 @@ static struct bgp *bgp_create(as_t *as, const char *name, | ||
bgp->evpn_info = XCALLOC(MTYPE_BGP_EVPN_INFO, | ||
sizeof(struct bgp_evpn_info)); | ||
- | ||
+ bgp->tcp_dscp = IPTOS_PREC_INTERNETCONTROL; | ||
bgp_evpn_init(bgp); | ||
bgp_evpn_vrf_es_init(bgp); | ||
bgp_pbr_init(bgp); | ||
|
||
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h | ||
index 2aa069002..914f296e5 100644 | ||
index 8b93c450e..e780d8a03 100644 | ||
--- a/bgpd/bgpd.h | ||
+++ b/bgpd/bgpd.h | ||
@@ -678,6 +678,9 @@ struct bgp { | ||
@@ -743,6 +743,9 @@ struct bgp { | ||
/* Weighted ECMP related config. */ | ||
enum bgp_link_bw_handling lb_handling; | ||
|
||
+ /* dscp value for tcp sessions */ | ||
+ uint8_t tcp_dscp; | ||
+ | ||
QOBJ_FIELDS | ||
}; | ||
DECLARE_QOBJ_TYPE(bgp) | ||
/* Process Queue for handling routes */ | ||
struct work_queue *process_queue; | ||
|
||
-- | ||
2.29.2.windows.2 | ||
2.12.2 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
From a81d37fc1558c33426a4fb59ff25c6d73a20f210 Mon Sep 17 00:00:00 2001 | ||
From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17 00:00:00 2001 | ||
From: Pavel Shirshov <[email protected]> | ||
Date: Mon, 16 Nov 2020 18:11:47 -0800 | ||
Subject: [PATCH 2/5] Reduce severity of 'Vty connected from' message | ||
Subject: [PATCH 2/8] Reduce severity of 'Vty connected from' message | ||
|
||
--- | ||
lib/vty.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/lib/vty.c b/lib/vty.c | ||
index 077c6f621..3204948b8 100644 | ||
index 8eaf13619..7edeb5538 100644 | ||
--- a/lib/vty.c | ||
+++ b/lib/vty.c | ||
@@ -1859,7 +1859,7 @@ static int vty_accept(struct thread *thread) | ||
@@ -1814,7 +1814,7 @@ static int vty_accept(struct thread *thread) | ||
zlog_info("can't set sockopt to vty_sock : %s", | ||
safe_strerror(errno)); | ||
|
||
- zlog_info("Vty connection from %s", | ||
+ zlog_debug("Vty connection from %s", | ||
sockunion2str(&su, buf, SU_ADDRSTRLEN)); | ||
- zlog_info("Vty connection from %pSU", &su); | ||
+ zlog_debug("Vty connection from %pSU", &su); | ||
|
||
vty_create(vty_sock, &su); | ||
|
||
-- | ||
2.29.2.windows.2 | ||
2.12.2 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
From ecc9aa458a34f49744a2b90d3a7ebcce951a8478 Mon Sep 17 00:00:00 2001 | ||
From 39bb40dc4bad4462e4ae9c98580d75fa2c92e032 Mon Sep 17 00:00:00 2001 | ||
From: Pavel Shirshov <[email protected]> | ||
Date: Mon, 16 Nov 2020 18:29:46 -0800 | ||
Subject: [PATCH 3/5] Use vrf_id for vrf, not tabled_id | ||
Subject: [PATCH 3/8] Use vrf_id for vrf, not tabled_id | ||
|
||
--- | ||
zebra/zebra_fpm_netlink.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c | ||
index 2c0741363..0ab92398f 100644 | ||
index ec22c5dd4..aad0156b3 100644 | ||
--- a/zebra/zebra_fpm_netlink.c | ||
+++ b/zebra/zebra_fpm_netlink.c | ||
@@ -286,7 +286,7 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd, | ||
ri->af = rib_dest_af(dest); | ||
@@ -287,7 +287,7 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd, | ||
ri->nlmsg_pid = zvrf->zns->netlink_dplane_out.snl.nl_pid; | ||
|
||
ri->nlmsg_type = cmd; | ||
- ri->rtm_table = rib_table_info(rib_dest_table(dest))->table_id; | ||
- ri->rtm_table = table_info->table_id; | ||
+ ri->rtm_table = zvrf_id(rib_dest_vrf(dest)); | ||
ri->rtm_protocol = RTPROT_UNSPEC; | ||
|
||
/* | ||
-- | ||
2.29.2.windows.2 | ||
2.12.2 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
From 70739436fc8ab4d5e507a0185fbc58eca298f7eb Mon Sep 17 00:00:00 2001 | ||
From afff474c79e0c177e090d1b45d68c9f816a52e3e Mon Sep 17 00:00:00 2001 | ||
From: Pavel Shirshov <[email protected]> | ||
Date: Mon, 16 Nov 2020 18:33:46 -0800 | ||
Subject: [PATCH 4/5] Allow BGP attr NEXT_HOP to be 0.0.0.0 due to alleviate | ||
the vendor bug | ||
Subject: [PATCH 4/8] Allow BGP attr NEXT_HOP to be 0.0.0.0 due to | ||
alleviate | ||
|
||
--- | ||
bgpd/bgp_route.c | 3 +-- | ||
1 file changed, 1 insertion(+), 2 deletions(-) | ||
|
||
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c | ||
index 1c646c03e..df2aa1b4c 100644 | ||
index b297ca006..d4b5066c6 100644 | ||
--- a/bgpd/bgp_route.c | ||
+++ b/bgpd/bgp_route.c | ||
@@ -3354,8 +3354,7 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi, | ||
@@ -3625,8 +3625,7 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi, | ||
|
||
/* If NEXT_HOP is present, validate it. */ | ||
if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP)) { | ||
|
@@ -22,5 +23,5 @@ index 1c646c03e..df2aa1b4c 100644 | |
return true; | ||
} | ||
-- | ||
2.29.2.windows.2 | ||
2.12.2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this deb package didn't exist