FRR 7.5
Build libyang1 which is required for frr 7.5
This commit is contained in:
parent
0b0da87766
commit
273846a412
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -47,7 +47,7 @@
|
||||
[submodule "src/sonic-frr/frr"]
|
||||
path = src/sonic-frr/frr
|
||||
url = https://github.com/Azure/sonic-frr.git
|
||||
branch = frr/7.2
|
||||
branch = frr/7.5
|
||||
[submodule "platform/p4/p4-hlir/p4-hlir-v1.1"]
|
||||
path = platform/p4/p4-hlir/p4-hlir-v1.1
|
||||
url = https://github.com/p4lang/p4-hlir.git
|
||||
|
@ -41,6 +41,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||
{% block bgp_init %}
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
{% if constants.bgp.multipath_relax.enabled is defined and constants.bgp.multipath_relax.enabled %}
|
||||
bgp bestpath as-path multipath-relax
|
||||
|
@ -1,5 +1,6 @@
|
||||
router bgp 65501
|
||||
bgp router-id 1.1.1.1
|
||||
no bgp ebgp-requires-policy
|
||||
bgp graceful-restart restart-time 180
|
||||
bgp graceful-restart
|
||||
neighbor 10.0.0.1 remote-as 65502
|
||||
|
@ -1,6 +1,7 @@
|
||||
router bgp 65501
|
||||
bgp router-id 1.1.1.1
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
neighbor fc00::2 remote-as 65502
|
||||
address-family ipv6
|
||||
neighbor fc00::2 activate
|
||||
|
@ -1,6 +1,7 @@
|
||||
router bgp 65501
|
||||
bgp router-id 1.1.1.1
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
neighbor 10.0.0.1 remote-as 65502
|
||||
address-family ipv4
|
||||
neighbor 10.0.0.1 activate
|
||||
|
10
rules/frr.mk
10
rules/frr.mk
@ -1,15 +1,15 @@
|
||||
# FRRouting (frr) package
|
||||
|
||||
FRR_VERSION = 7.2.1
|
||||
FRR_VERSION = 7.5
|
||||
FRR_SUBVERSION = 0
|
||||
FRR_BRANCH = frr/7.2
|
||||
FRR_TAG = frr-7.2.1-s3
|
||||
FRR_BRANCH = frr/7.5
|
||||
FRR_TAG = frr-7.5-s1
|
||||
export FRR_VERSION FRR_SUBVERSION FRR_BRANCH FRR_TAG
|
||||
|
||||
|
||||
FRR = frr_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(FRR)_DEPENDS += $(LIBSNMP_DEV) $(LIBYANG_DEV)
|
||||
$(FRR)_RDEPENDS += $(LIBYANG)
|
||||
$(FRR)_DEPENDS += $(LIBSNMP_DEV) $(LIBYANG1) $(LIBYANG1_DEV)
|
||||
$(FRR)_RDEPENDS += $(LIBYANG1)
|
||||
$(FRR)_SRC_PATH = $(SRC_PATH)/sonic-frr
|
||||
SONIC_MAKE_DEBS += $(FRR)
|
||||
|
||||
|
10
rules/libyang1.dep
Normal file
10
rules/libyang1.dep
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
SPATH := $($(LIBYANG1)_SRC_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/libyang1.mk rules/libyang1.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(SPATH))
|
||||
|
||||
$(LIBYANG)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(LIBYANG)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(LIBYANG)_DEP_FILES := $(DEP_FILES)
|
||||
|
33
rules/libyang1.mk
Normal file
33
rules/libyang1.mk
Normal file
@ -0,0 +1,33 @@
|
||||
# libyang1
|
||||
|
||||
LIBYANG1_VERSION_BASE = 1.0
|
||||
LIBYANG1_VERSION = $(LIBYANG_VERSION_BASE).184
|
||||
LIBYANG1_SUBVERSION = 2
|
||||
LIBYANG1_FULLVERSION = $(LIBYANG1_VERSION)-$(LIBYANG1_SUBVERSION)
|
||||
|
||||
export LIBYANG1_VERSION_BASE
|
||||
export LIBYANG1_VERSION
|
||||
export LIBYANG1_SUBVERSION
|
||||
export LIBYANG1_FULLVERSION
|
||||
|
||||
LIBYANG1 = libyang1_$(LIBYANG1_FULLVERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(LIBYANG1)_SRC_PATH = $(SRC_PATH)/libyang1
|
||||
SONIC_MAKE_DEBS += $(LIBYANG1)
|
||||
|
||||
LIBYANG1_DEV = libyang-dev_$(LIBYANG1_FULLVERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(eval $(call add_derived_package,$(LIBYANG1),$(LIBYANG1_DEV)))
|
||||
|
||||
LIBYANG1_DBG = libyang1-dbgsym_$(LIBYANG1_FULLVERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(eval $(call add_derived_package,$(LIBYANG1),$(LIBYANG1_DBG)))
|
||||
|
||||
LIBYANG1_CPP = libyang-cpp1_$(LIBYANG1_FULLVERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(LIBYANG1_CPP)_DEPENDS += $(LIBYANG1)
|
||||
$(eval $(call add_derived_package,$(LIBYANG1),$(LIBYANG1_CPP)))
|
||||
|
||||
LIBYANG1_CPP_DEV = libyang-cpp-dev_$(LIBYANG1_FULLVERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(eval $(call add_derived_package,$(LIBYANG1_CPP),$(LIBYANG1_CPP_DEV)))
|
||||
|
||||
LIBYANG1_CPP_DBG = libyang-cpp1-dbgsym_$(LIBYANG1_FULLVERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(eval $(call add_derived_package,$(LIBYANG1_CPP),$(LIBYANG1_CPP_DBG)))
|
||||
|
||||
export LIBYANG1 LIBYANG1_DBG LIBYANG1_DEV LIBYANG1_CPP LIBYANG1_CPP_DEV LIBYANG1_CPP_DBG
|
3
src/libyang1/.gitignore
vendored
Normal file
3
src/libyang1/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*
|
||||
!.gitignore
|
||||
!Makefile
|
32
src/libyang1/Makefile
Normal file
32
src/libyang1/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
.ONESHELL:
|
||||
SHELL = /bin/bash
|
||||
.SHELLFLAGS += -e
|
||||
|
||||
MAIN_TARGET = $(LIBYANG1)
|
||||
DERIVED_TARGETS = $(LIBYANG1_DEV) $(LIBYANG1_DBG) $(LIBYANG1_CPP) $(LIBYANG1_CPP_DEV) $(LIBYANG1_CPP_DBG)
|
||||
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
# Obtaining the libyang
|
||||
# rm -fr ./libyang-$(LIBYANG1_VERSION)
|
||||
# git clone https://github.com/CESNET/libyang.git libyang-$(LIBYANG1_VERSION)
|
||||
# pushd libyang-$(LIBYANG1_VERSION)
|
||||
# git checkout tags/v1.0.184 -b libyang
|
||||
# git cherry-pick 1054200178d0277010e832f270841a586a62b31b
|
||||
# git cherry-pick aab48f14db4d8d21b22c50bdc6b29d0198f21996
|
||||
# mkdir build
|
||||
# pushd build
|
||||
# cmake -DENABLE_STATIC=ON -DENABLE_LYD_PRIV=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="Package" ..
|
||||
# make build-deb
|
||||
rm -fr ./libyang-1.0.184
|
||||
wget -NO libyang_1.0.184-2.dsc http://deb.debian.org/debian/pool/main/liby/libyang/libyang_1.0.184-2.dsc
|
||||
wget -NO libyang_1.0.184.orig.tar.gz http://deb.debian.org/debian/pool/main/liby/libyang/libyang_1.0.184.orig.tar.gz
|
||||
wget -NO libyang_1.0.184-2.debian.tar.xz http://deb.debian.org/debian/pool/main/liby/libyang/libyang_1.0.184-2.debian.tar.xz
|
||||
dpkg-source -x libyang_1.0.184-2.dsc
|
||||
pushd libyang-1.0.184
|
||||
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
|
||||
popd
|
||||
mv $* $(DEST)/
|
||||
mv $(DERIVED_TARGETS) $(DEST)/
|
||||
|
||||
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
|
@ -40,6 +40,7 @@ router bgp 55555
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -22,6 +22,7 @@ router bgp 55555
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -13,6 +13,7 @@ router bgp 55555
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp router-id 55.55.55.55
|
||||
!
|
||||
|
@ -22,6 +22,7 @@ router bgp 55555
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -64,6 +64,7 @@ router bgp 55555
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -41,6 +41,7 @@ router bgp 65100
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -64,6 +64,7 @@ router bgp 65100
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -59,6 +59,7 @@ router bgp 4000
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -41,6 +41,7 @@ router bgp 65100
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -64,6 +64,7 @@ router bgp 65100
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -59,6 +59,7 @@ router bgp 4000
|
||||
!
|
||||
bgp log-neighbor-changes
|
||||
no bgp default ipv4-unicast
|
||||
no bgp ebgp-requires-policy
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
|
@ -20,6 +20,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
git checkout $(FRR_BRANCH)
|
||||
stg branch --delete $(STG_BRANCH)
|
||||
git rev-parse --short HEAD | xargs git checkout
|
||||
git checkout master
|
||||
git branch -D $(FRR_BRANCH)
|
||||
popd
|
||||
mv $(DERIVED_TARGET) $* $(DEST)/
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 2f3f691f44ea0194a145aed59606fdd0f33ecdb4
|
||||
Subproject commit 4ed6312d10d369f621f69202ad39cfa6a597c59c
|
@ -1,20 +1,20 @@
|
||||
From 3ec4fa4c8377330d4e3bdbdfc453a79a7827d84d Mon Sep 17 00:00:00 2001
|
||||
From 71415ae851357025a99b8ead7edf5755a55b6fbb Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Shirshov <pavelsh@microsoft.com>
|
||||
Date: Mon, 4 Nov 2019 18:09:51 -0800
|
||||
Subject: [PATCH 1/1] Add support of bgp tcp DSCP value
|
||||
Date: Mon, 16 Nov 2020 18:00:12 -0800
|
||||
Subject: [PATCH 1/5] Add support of bgp tcp DSCP value
|
||||
|
||||
---
|
||||
bgpd/bgp_network.c | 11 ++++-------
|
||||
bgpd/bgp_vty.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
bgpd/bgpd.c | 5 ++++-
|
||||
bgpd/bgp_vty.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
bgpd/bgpd.c | 2 +-
|
||||
bgpd/bgpd.h | 3 +++
|
||||
4 files changed, 51 insertions(+), 8 deletions(-)
|
||||
4 files changed, 52 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
|
||||
index 1394c60b2..a70268b05 100644
|
||||
index cae11ae7b..f1d96664d 100644
|
||||
--- a/bgpd/bgp_network.c
|
||||
+++ b/bgpd/bgp_network.c
|
||||
@@ -633,11 +633,9 @@ int bgp_connect(struct peer *peer)
|
||||
@@ -721,11 +721,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 1394c60b2..a70268b05 100644
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -713,10 +711,9 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,
|
||||
@@ -801,10 +799,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 1394c60b2..a70268b05 100644
|
||||
|
||||
sockopt_v6only(sa->sa_family, sock);
|
||||
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
|
||||
index 141d5cf30..8faa918d0 100644
|
||||
index bb2f89f9e..33662b08e 100644
|
||||
--- a/bgpd/bgp_vty.c
|
||||
+++ b/bgpd/bgp_vty.c
|
||||
@@ -1182,6 +1182,42 @@ DEFUN (no_router_bgp,
|
||||
@@ -1330,6 +1330,42 @@ DEFUN (no_router_bgp,
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
@ -88,7 +88,18 @@ index 141d5cf30..8faa918d0 100644
|
||||
|
||||
/* BGP router-id. */
|
||||
|
||||
@@ -13035,6 +13071,10 @@ void bgp_vty_init(void)
|
||||
@@ -15549,6 +15585,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");
|
||||
|
||||
+ /* BGP session DSCP value */
|
||||
+ if (bgp->tcp_dscp != IPTOS_PREC_INTERNETCONTROL)
|
||||
+ 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)
|
||||
/* "no router bgp" commands. */
|
||||
install_element(CONFIG_NODE, &no_router_bgp_cmd);
|
||||
|
||||
@ -100,10 +111,10 @@ index 141d5cf30..8faa918d0 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 80c6dd613..87a8ef34f 100644
|
||||
index cf9ff038d..0e8579843 100644
|
||||
--- a/bgpd/bgpd.c
|
||||
+++ b/bgpd/bgpd.c
|
||||
@@ -3050,7 +3050,7 @@ static struct bgp *bgp_create(as_t *as, const char *name,
|
||||
@@ -3069,7 +3069,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));
|
||||
@ -111,24 +122,14 @@ index 80c6dd613..87a8ef34f 100644
|
||||
+ bgp->tcp_dscp = IPTOS_PREC_INTERNETCONTROL;
|
||||
bgp_evpn_init(bgp);
|
||||
bgp_pbr_init(bgp);
|
||||
return bgp;
|
||||
@@ -7564,6 +7564,9 @@ 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");
|
||||
|
||||
+ if (bgp->tcp_dscp != IPTOS_PREC_INTERNETCONTROL)
|
||||
+ 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",
|
||||
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
|
||||
index e4f4dc0b5..4d372c562 100644
|
||||
index 2aa069002..914f296e5 100644
|
||||
--- a/bgpd/bgpd.h
|
||||
+++ b/bgpd/bgpd.h
|
||||
@@ -569,6 +569,9 @@ struct bgp {
|
||||
/* Count of peers in established state */
|
||||
uint32_t established_peers;
|
||||
@@ -678,6 +678,9 @@ struct bgp {
|
||||
/* Weighted ECMP related config. */
|
||||
enum bgp_link_bw_handling lb_handling;
|
||||
|
||||
+ /* dscp value for tcp sessions */
|
||||
+ uint8_t tcp_dscp;
|
||||
@ -137,5 +138,5 @@ index e4f4dc0b5..4d372c562 100644
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(bgp)
|
||||
--
|
||||
2.17.1.windows.2
|
||||
2.29.2.windows.2
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
From 63b5b14ad289f18928beac65754e7bb13183b5dc Mon Sep 17 00:00:00 2001
|
||||
From a81d37fc1558c33426a4fb59ff25c6d73a20f210 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Shirshov <pavelsh@microsoft.com>
|
||||
Date: Mon, 4 Nov 2019 18:12:54 -0800
|
||||
Subject: [PATCH 1/1] Reduce severity of 'Vty connected from' message
|
||||
Date: Mon, 16 Nov 2020 18:11:47 -0800
|
||||
Subject: [PATCH 2/5] 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 deb9391bd..743ff1c17 100644
|
||||
index 077c6f621..3204948b8 100644
|
||||
--- a/lib/vty.c
|
||||
+++ b/lib/vty.c
|
||||
@@ -1853,7 +1853,7 @@ static int vty_accept(struct thread *thread)
|
||||
@@ -1859,7 +1859,7 @@ static int vty_accept(struct thread *thread)
|
||||
zlog_info("can't set sockopt to vty_sock : %s",
|
||||
safe_strerror(errno));
|
||||
|
||||
@ -21,5 +21,5 @@ index deb9391bd..743ff1c17 100644
|
||||
|
||||
vty_create(vty_sock, &su);
|
||||
--
|
||||
2.17.1.windows.2
|
||||
2.29.2.windows.2
|
||||
|
||||
|
@ -1,35 +1,25 @@
|
||||
From 9e7f1de3b79ca6ada8a3124f4cdc35530284832e Mon Sep 17 00:00:00 2001
|
||||
From ecc9aa458a34f49744a2b90d3a7ebcce951a8478 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Shirshov <pavelsh@microsoft.com>
|
||||
Date: Tue, 5 Nov 2019 06:16:51 -0800
|
||||
Subject: [PATCH 1/1] Use vrf_id for vrf, not tabled_id
|
||||
Date: Mon, 16 Nov 2020 18:29:46 -0800
|
||||
Subject: [PATCH 3/5] Use vrf_id for vrf, not tabled_id
|
||||
|
||||
---
|
||||
zebra/zebra_fpm_netlink.c | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
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 f347d3955..74aab8228 100644
|
||||
index 2c0741363..0ab92398f 100644
|
||||
--- a/zebra/zebra_fpm_netlink.c
|
||||
+++ b/zebra/zebra_fpm_netlink.c
|
||||
@@ -284,7 +284,6 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd,
|
||||
rib_dest_t *dest, struct route_entry *re)
|
||||
{
|
||||
struct nexthop *nexthop;
|
||||
- struct zebra_vrf *zvrf;
|
||||
|
||||
memset(ri, 0, sizeof(*ri));
|
||||
|
||||
@@ -292,9 +291,7 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd,
|
||||
@@ -286,7 +286,7 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,
|
||||
ri->af = rib_dest_af(dest);
|
||||
|
||||
ri->nlmsg_type = cmd;
|
||||
- zvrf = rib_dest_vrf(dest);
|
||||
- if (zvrf)
|
||||
- ri->rtm_table = zvrf->table_id;
|
||||
- ri->rtm_table = rib_table_info(rib_dest_table(dest))->table_id;
|
||||
+ ri->rtm_table = zvrf_id(rib_dest_vrf(dest));
|
||||
ri->rtm_protocol = RTPROT_UNSPEC;
|
||||
|
||||
/*
|
||||
--
|
||||
2.17.1.windows.2
|
||||
2.29.2.windows.2
|
||||
|
||||
|
@ -1,27 +1,26 @@
|
||||
From fe1e544d46d721798594fcec175665e3754500a6 Mon Sep 17 00:00:00 2001
|
||||
From 70739436fc8ab4d5e507a0185fbc58eca298f7eb Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Shirshov <pavelsh@microsoft.com>
|
||||
Date: Mon, 4 Nov 2019 18:14:12 -0800
|
||||
Subject: [PATCH 1/1] Allow BGP attr NEXT_HOP to be 0.0.0.0 due to alleviate
|
||||
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
|
||||
|
||||
---
|
||||
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 c122df498..3c7aa3075 100644
|
||||
index 1c646c03e..df2aa1b4c 100644
|
||||
--- a/bgpd/bgp_route.c
|
||||
+++ b/bgpd/bgp_route.c
|
||||
@@ -2983,8 +2983,7 @@ static int bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
|
||||
@@ -3354,8 +3354,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)) {
|
||||
- if (attr->nexthop.s_addr == 0
|
||||
- if (attr->nexthop.s_addr == INADDR_ANY
|
||||
- || IPV4_CLASS_DE(ntohl(attr->nexthop.s_addr))
|
||||
+ if (IPV4_CLASS_DE(ntohl(attr->nexthop.s_addr))
|
||||
|| bgp_nexthop_self(bgp, attr->nexthop))
|
||||
return 1;
|
||||
|| bgp_nexthop_self(bgp, afi, type, stype, attr, dest))
|
||||
return true;
|
||||
}
|
||||
--
|
||||
2.17.1.windows.2
|
||||
2.29.2.windows.2
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 2f0b5aef66316b47d2cc8ac18453600621a6a317 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Li <tyler.li@mediatek.com>
|
||||
Date: Thu, 14 Nov 2019 23:46:52 -0800
|
||||
Subject: [PATCH] nexthops compare vrf only if ip type
|
||||
From dd66532a0e73b0c3ae6375e795b3b47f16196d09 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Shirshov <pavelsh@microsoft.com>
|
||||
Date: Mon, 16 Nov 2020 18:35:01 -0800
|
||||
Subject: [PATCH 5/5] nexthops compare vrf only if ip type
|
||||
|
||||
---
|
||||
lib/nexthop.c | 12 ++++++------
|
||||
@ -9,7 +9,7 @@ Subject: [PATCH] nexthops compare vrf only if ip type
|
||||
2 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/lib/nexthop.c b/lib/nexthop.c
|
||||
index cf5bed3d6..7d9f646c9 100644
|
||||
index 0ea72d03e..50552df60 100644
|
||||
--- a/lib/nexthop.c
|
||||
+++ b/lib/nexthop.c
|
||||
@@ -105,12 +105,6 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
|
||||
@ -25,7 +25,7 @@ index cf5bed3d6..7d9f646c9 100644
|
||||
if (next1->type < next2->type)
|
||||
return -1;
|
||||
|
||||
@@ -120,6 +114,12 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
|
||||
@@ -126,6 +120,12 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
|
||||
switch (next1->type) {
|
||||
case NEXTHOP_TYPE_IPV4:
|
||||
case NEXTHOP_TYPE_IPV6:
|
||||
@ -39,10 +39,10 @@ index cf5bed3d6..7d9f646c9 100644
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
diff --git a/lib/zclient.c b/lib/zclient.c
|
||||
index c739af043..0d37c46d1 100644
|
||||
index fb48d4a12..39132465f 100644
|
||||
--- a/lib/zclient.c
|
||||
+++ b/lib/zclient.c
|
||||
@@ -783,12 +783,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
|
||||
@@ -822,12 +822,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@ -55,7 +55,7 @@ index c739af043..0d37c46d1 100644
|
||||
if (next1->type < next2->type)
|
||||
return -1;
|
||||
|
||||
@@ -798,6 +792,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
|
||||
@@ -843,6 +837,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
|
||||
switch (next1->type) {
|
||||
case NEXTHOP_TYPE_IPV4:
|
||||
case NEXTHOP_TYPE_IPV6:
|
||||
@ -69,5 +69,5 @@ index c739af043..0d37c46d1 100644
|
||||
&next2->gate);
|
||||
if (ret != 0)
|
||||
--
|
||||
2.11.0
|
||||
2.29.2.windows.2
|
||||
|
||||
|
@ -1,85 +0,0 @@
|
||||
From 6d43b90540c6aeda0fff001de93c88e01aacadab Mon Sep 17 00:00:00 2001
|
||||
From: sudhanshukumar22 <sudhanshu.kumar@broadcom.com>
|
||||
Date: Tue, 15 Oct 2019 02:11:01 -0700
|
||||
Subject: [PATCH] lib: changes for making snmp socket non-blocking
|
||||
|
||||
Description: The changes have been done to make the snmp socket
|
||||
non-blocking before calling snmp_read()
|
||||
FRR Pull request: https://github.com/FRRouting/frr/pull/5134
|
||||
|
||||
Problem Description/Summary :
|
||||
vtysh hangs on first try to enter after a reboot with BGP dynamic peers
|
||||
|
||||
Expected Behavior :
|
||||
VTYSH should not hang.
|
||||
When we debug more into bgpd docker by doing gdb on its threads, we find the below thread of bgpd, which is causing the issue.
|
||||
Thread 1 (Thread 0x7f1e1ec46d40 (LWP 47)):
|
||||
|
||||
0x00007f1e1d762593 in recvfrom () from /lib/x86_64-linux-gnu/libpthread.so.0
|
||||
0x00007f1e1aadd09b in netsnmp_tcpbase_recv () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
|
||||
0x00007f1e1aad9617 in netsnmp_transport_recv () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
|
||||
0x00007f1e1aab2c07 in _sess_read () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
|
||||
0x00007f1e1aab3a29 in snmp_sess_read2 () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
|
||||
0x00007f1e1aab3a7b in snmp_read2 () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
|
||||
0x00007f1e1aab3acf in snmp_read () from /usr/lib/x86_64-linux-gnu/libnetsnmp.so.30
|
||||
0x00007f1e1b44d7ec in agentx_read (t=0x7fffa75f0080) at lib/agentx.c:63
|
||||
0x00007f1e1e7d6451 in thread_call (thread=0x7fffa75f0080) at lib/thread.c:1620
|
||||
0x00007f1e1e770699 in frr_run (master=0x559396ea60f0) at lib/libfrr.c:1011
|
||||
0x0000559395b4d953 in main (argc=5, argv=0x7fffa75f02b8) at bgpd/bgp_main.c:492
|
||||
|
||||
(gdb) bt
|
||||
|
||||
0x00007f830c89d210 in __read_nocancel () from /lib/x86_64-linux-gnu/libpthread.so.0
|
||||
0x000056450e1e8238 in vtysh_client_run (vclient=0x56450e4a8b40 <vtysh_client+24768>, line=0x56450e21add0 enable, callback=0x0, cbarg=0x0) at vtysh/vtysh.c:216
|
||||
0x000056450e1e8c6b in vtysh_client_run_all (head_client=0x56450e4a8b40 <vtysh_client+24768>, line=0x56450e21add0 enable, continue_on_err=0, callback=0x0, cbarg=0x0) at vtysh/vtysh.c:356
|
||||
0x000056450e1e8ddb in vtysh_client_execute (head_client=0x56450e4a8b40 <vtysh_client+24768>, line=0x56450e21add0 enable) at vtysh/vtysh.c:393
|
||||
0x000056450e1e9c82 in vtysh_execute_func (line=0x56450e21add0 enable, pager=0) at vtysh/vtysh.c:598
|
||||
0x000056450e1e9dee in vtysh_execute_no_pager (line=0x56450e21add0 enable) at vtysh/vtysh.c:619
|
||||
0x000056450e1f7d48 in vtysh_read_file (confp=0x56451000a9d0, top_cfg=1) at vtysh/vtysh_config.c:494
|
||||
0x000056450e1f7ef2 in vtysh_read_config (config_default_dir=0x56450e4edc20 <frr_config> /etc/frr/frr.conf, top_cfg=1) at vtysh/vtysh_config.c:522
|
||||
0x000056450e1e5de4 in vtysh_apply_top_level_config () at vtysh/vtysh_main.c:301
|
||||
0x000056450e1e7842 in main (argc=2, argv=0x7ffc81e6f598, env=0x7ffc81e6f5b0) at vtysh/vtysh_main.c:692
|
||||
|
||||
The fix has been taken from the following link.
|
||||
https://sourceforge.net/p/net-snmp/patches/1348/
|
||||
---
|
||||
lib/agentx.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/lib/agentx.c b/lib/agentx.c
|
||||
index 40cac722a..2c6a43d1a 100644
|
||||
--- a/lib/agentx.c
|
||||
+++ b/lib/agentx.c
|
||||
@@ -55,13 +55,29 @@ static int agentx_timeout(struct thread *t)
|
||||
static int agentx_read(struct thread *t)
|
||||
{
|
||||
fd_set fds;
|
||||
+ int flags;
|
||||
+ int nonblock = false;
|
||||
struct listnode *ln = THREAD_ARG(t);
|
||||
list_delete_node(events, ln);
|
||||
|
||||
+ /* fix for non blocking socket */
|
||||
+ flags = fcntl(THREAD_FD(t), F_GETFL, 0);
|
||||
+ if (-1 == flags)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (flags & O_NONBLOCK)
|
||||
+ nonblock = true;
|
||||
+ else
|
||||
+ fcntl(THREAD_FD(t), F_SETFL, flags | O_NONBLOCK);
|
||||
+
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(THREAD_FD(t), &fds);
|
||||
snmp_read(&fds);
|
||||
|
||||
+ /* Reset the flag */
|
||||
+ if (!nonblock)
|
||||
+ fcntl(THREAD_FD(t), F_SETFL, flags);
|
||||
+
|
||||
netsnmp_check_outstanding_agent_requests();
|
||||
agentx_events_update();
|
||||
return 0;
|
||||
--
|
||||
2.18.0
|
||||
|
@ -3,5 +3,5 @@
|
||||
0003-Use-vrf_id-for-vrf-not-tabled_id.patch
|
||||
0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch
|
||||
0005-nexthops-compare-vrf-only-if-ip-type.patch
|
||||
0006-changes-for-making-snmp-socket-non-blocking.patch
|
||||
0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user