Skip to content

Commit

Permalink
[frr]: Move to version 7.2 (#3704)
Browse files Browse the repository at this point in the history
* Use 7.2 tree to generate frr packages

* Adapt patches for frr/7.2

* Use vrf_id
  • Loading branch information
pavel-shirshov committed Nov 6, 2019
1 parent a117b25 commit aa1a136
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 390 deletions.
2 changes: 1 addition & 1 deletion rules/frr.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FRRouting (frr) package

FRR_VERSION = 7.1
FRR_VERSION = 7.2
FRR_SUBVERSION = 0
export FRR_VERSION FRR_SUBVERSION

Expand Down
2 changes: 1 addition & 1 deletion src/sonic-frr/frr
Submodule frr updated from 8c5e03 to 514f50
26 changes: 13 additions & 13 deletions src/sonic-frr/patch/0001-Add-support-of-bgp-tcp-DSCP-value.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From ab8ae984def8ee5cea22f802b2a60a05214c11d2 Mon Sep 17 00:00:00 2001
From 3ec4fa4c8377330d4e3bdbdfc453a79a7827d84d Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Mon, 7 Oct 2019 17:00:15 -0700
Date: Mon, 4 Nov 2019 18:09:51 -0800
Subject: [PATCH 1/1] Add support of bgp tcp DSCP value

---
Expand All @@ -11,12 +11,12 @@ Subject: [PATCH 1/1] Add support of bgp tcp DSCP value
4 files changed, 51 insertions(+), 8 deletions(-)

diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 6a5c2c4b3..9ec162aa4 100644
index 1394c60b2..a70268b05 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -627,11 +627,9 @@ int bgp_connect(struct peer *peer)
@@ -633,11 +633,9 @@ int bgp_connect(struct peer *peer)
#ifdef IPTOS_PREC_INTERNETCONTROL
frr_elevate_privs(&bgpd_privs) {
frr_with_privs(&bgpd_privs) {
if (sockunion_family(&peer->su) == AF_INET)
- setsockopt_ipv4_tos(peer->fd,
- IPTOS_PREC_INTERNETCONTROL);
Expand All @@ -28,7 +28,7 @@ index 6a5c2c4b3..9ec162aa4 100644
}
#endif

@@ -707,10 +705,9 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,
@@ -713,10 +711,9 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,

#ifdef IPTOS_PREC_INTERNETCONTROL
if (sa->sa_family == AF_INET)
Expand All @@ -42,10 +42,10 @@ index 6a5c2c4b3..9ec162aa4 100644

sockopt_v6only(sa->sa_family, sock);
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index d05432327..a15a0f526 100644
index 141d5cf30..8faa918d0 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -1139,6 +1139,42 @@ DEFUN (no_router_bgp,
@@ -1182,6 +1182,42 @@ DEFUN (no_router_bgp,
return CMD_SUCCESS;
}

Expand Down Expand Up @@ -88,7 +88,7 @@ index d05432327..a15a0f526 100644

/* BGP router-id. */

@@ -12929,6 +12965,10 @@ void bgp_vty_init(void)
@@ -13035,6 +13071,10 @@ void bgp_vty_init(void)
/* "no router bgp" commands. */
install_element(CONFIG_NODE, &no_router_bgp_cmd);

Expand All @@ -100,10 +100,10 @@ index d05432327..a15a0f526 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 8c0b5336e..55aeb2dd8 100644
index 80c6dd613..87a8ef34f 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -3040,7 +3040,7 @@ static struct bgp *bgp_create(as_t *as, const char *name,
@@ -3050,7 +3050,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));
Expand All @@ -112,7 +112,7 @@ index 8c0b5336e..55aeb2dd8 100644
bgp_evpn_init(bgp);
bgp_pbr_init(bgp);
return bgp;
@@ -7629,6 +7629,9 @@ int bgp_config_write(struct vty *vty)
@@ -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");

Expand All @@ -123,7 +123,7 @@ index 8c0b5336e..55aeb2dd8 100644
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 b0f656753..32983a0a9 100644
index e4f4dc0b5..4d372c562 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -569,6 +569,9 @@ struct bgp {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 5a30a4e91a91f8e19c69ef219cd6d8b19e9b6fae Mon Sep 17 00:00:00 2001
From 63b5b14ad289f18928beac65754e7bb13183b5dc Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Mon, 7 Oct 2019 17:06:27 -0700
Date: Mon, 4 Nov 2019 18:12:54 -0800
Subject: [PATCH 1/1] 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 b1ed3d63c..5aa4b56cb 100644
index deb9391bd..743ff1c17 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1870,7 +1870,7 @@ static int vty_accept(struct thread *thread)
@@ -1853,7 +1853,7 @@ static int vty_accept(struct thread *thread)
zlog_info("can't set sockopt to vty_sock : %s",
safe_strerror(errno));

Expand Down
35 changes: 35 additions & 0 deletions src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 9e7f1de3b79ca6ada8a3124f4cdc35530284832e 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

---
zebra/zebra_fpm_netlink.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
index f347d3955..74aab8228 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,
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 = zvrf_id(rib_dest_vrf(dest));
ri->rtm_protocol = RTPROT_UNSPEC;

/*
--
2.17.1.windows.2

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 9fa0ffcc8f9ec987af527e911cd748014aeacffe Mon Sep 17 00:00:00 2001
From fe1e544d46d721798594fcec175665e3754500a6 Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Mon, 7 Oct 2019 17:15:15 -0700
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
the vendor bug

Expand All @@ -9,10 +9,10 @@ Subject: [PATCH 1/1] Allow BGP attr NEXT_HOP to be 0.0.0.0 due to alleviate
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index f8eae135e..732115756 100644
index c122df498..3c7aa3075 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -2904,8 +2904,7 @@ static int bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
@@ -2983,8 +2983,7 @@ static int 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)) {
Expand Down
30 changes: 0 additions & 30 deletions src/sonic-frr/patch/0005-Support-VRF.patch

This file was deleted.

This file was deleted.

Loading

0 comments on commit aa1a136

Please sign in to comment.