Skip to content

Commit 1789c10

Browse files
committed
[sonic-frr]: Port patches from frr-10.3 to frr-10.4.1
Signed-off-by: Yuqing Zhao <[email protected]>
1 parent 549e7a2 commit 1789c10

File tree

63 files changed

+303
-11348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+303
-11348
lines changed

src/sonic-frr/patch/0001-Reduce-severity-of-Vty-connected-from-message.patch renamed to src/sonic-frr/patch/0001-SONiC-ONLY-Reduce-severity-of-Vty-connected-from-message.patch

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
From 69370e52e94c66e06052a7859dd059dfa34fd61e Mon Sep 17 00:00:00 2001
1+
[PATCH] From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17
2+
23
From: Pavel Shirshov <[email protected]>
34
Date: Mon, 16 Nov 2020 18:11:47 -0800
4-
Subject: [PATCH] From 15274a197e4d3b7ac0f11ca63a5274f1168739f5 Mon Sep 17
55
00:00:00 2001 Subject: [PATCH 2/8] Reduce severity of 'Vty connected from'
66
message
7-
7+
---
8+
lib/vty.c | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
810

911
diff --git a/lib/vty.c b/lib/vty.c
10-
index 1d04e75bf..ecbbd73db 100644
12+
index 43ff964d8..fad2ff991 100644
1113
--- a/lib/vty.c
1214
+++ b/lib/vty.c
13-
@@ -1968,7 +1968,7 @@ static void vty_accept(struct event *thread)
15+
@@ -1959,7 +1959,7 @@ static void vty_accept(struct event *thread)
1416
zlog_info("can't set sockopt to vty_sock : %s",
1517
safe_strerror(errno));
1618

@@ -19,6 +21,3 @@ index 1d04e75bf..ecbbd73db 100644
1921

2022
vty_create(vty_sock, &su);
2123
}
22-
--
23-
2.17.1
24-

src/sonic-frr/patch/0002-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch renamed to src/sonic-frr/patch/0002-SONiC-ONLY-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
From 44ed2b0d2a2ca6029238118603264e02e2e965f4 Mon Sep 17 00:00:00 2001
1+
[PATCH] From afff474c79e0c177e090d1b45d68c9f816a52e3e Mon Sep 17
2+
23
From: Pavel Shirshov <[email protected]>
34
Date: Mon, 16 Nov 2020 18:33:46 -0800
4-
Subject: [PATCH] From afff474c79e0c177e090d1b45d68c9f816a52e3e Mon Sep 17
55
00:00:00 2001 Subject: [PATCH 4/8] Allow BGP attr NEXT_HOP to be 0.0.0.0 due
66
to alleviate
7-
7+
---
8+
bgpd/bgp_route.c | 3 +--
9+
1 file changed, 1 insertion(+), 2 deletions(-)
810

911
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
10-
index 39172cc08..9d96a3e43 100644
12+
index aa6c701ca..a8427bc3b 100644
1113
--- a/bgpd/bgp_route.c
1214
+++ b/bgpd/bgp_route.c
13-
@@ -4719,8 +4719,7 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
15+
@@ -4786,8 +4786,7 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
1416
* E.g.: IPv6 prefix can be with nexthop: 0.0.0.0, and mp_nexthop: fc00::1.
1517
*/
1618
if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP)))
@@ -20,6 +22,3 @@ index 39172cc08..9d96a3e43 100644
2022
bgp_nexthop_self(bgp, afi, type, stype, attr, dest));
2123

2224
/* If MP_NEXTHOP is present, validate it. */
23-
--
24-
2.17.1
25-

src/sonic-frr/patch/0003-nexthops-compare-vrf-only-if-ip-type.patch renamed to src/sonic-frr/patch/0003-SONiC-ONLY-nexthops-compare-vrf-only-if-ip-type.patch

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
From 2b778b1984c5f88500625a0e96a5ba1d1fe0316c Mon Sep 17 00:00:00 2001
1+
[PATCH] From 786087468520db44c55e3566f77438b41f52763f Mon Sep 17
2+
23
From: Pavel Shirshov <[email protected]>
34
Date: Mon, 16 Nov 2020 18:35:01 -0800
4-
Subject: [PATCH] From 786087468520db44c55e3566f77438b41f52763f Mon Sep 17
55
00:00:00 2001 Subject: [PATCH 5/8] nexthops compare vrf only if ip type
6-
6+
---
7+
lib/nexthop.c | 12 ++++++------
8+
lib/zclient.c | 12 ++++++------
9+
2 files changed, 12 insertions(+), 12 deletions(-)
710

811
diff --git a/lib/nexthop.c b/lib/nexthop.c
9-
index c377b9cb0..6fe45b2c5 100644
12+
index e8f5ecf17..9381b3a89 100644
1013
--- a/lib/nexthop.c
1114
+++ b/lib/nexthop.c
12-
@@ -143,12 +143,6 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
15+
@@ -149,12 +149,6 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
1316
{
1417
int ret = 0;
1518

@@ -22,7 +25,7 @@ index c377b9cb0..6fe45b2c5 100644
2225
if (next1->type < next2->type)
2326
return -1;
2427

25-
@@ -166,6 +160,12 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
28+
@@ -172,6 +166,12 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
2629
switch (next1->type) {
2730
case NEXTHOP_TYPE_IPV4:
2831
case NEXTHOP_TYPE_IPV6:
@@ -36,10 +39,10 @@ index c377b9cb0..6fe45b2c5 100644
3639
if (ret != 0)
3740
return ret;
3841
diff --git a/lib/zclient.c b/lib/zclient.c
39-
index 5deea8f0c..28e9da721 100644
42+
index 558626fa3..3ab7bc040 100644
4043
--- a/lib/zclient.c
4144
+++ b/lib/zclient.c
42-
@@ -976,12 +976,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
45+
@@ -982,12 +982,6 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
4346
{
4447
int ret = 0;
4548

@@ -52,7 +55,7 @@ index 5deea8f0c..28e9da721 100644
5255
if (next1->type < next2->type)
5356
return -1;
5457

55-
@@ -997,6 +991,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
58+
@@ -1003,6 +997,12 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
5659
switch (next1->type) {
5760
case NEXTHOP_TYPE_IPV4:
5861
case NEXTHOP_TYPE_IPV6:
@@ -65,6 +68,3 @@ index 5deea8f0c..28e9da721 100644
6568
ret = nexthop_g_addr_cmp(next1->type, &next1->gate,
6669
&next2->gate);
6770
if (ret != 0)
68-
--
69-
2.17.1
70-

src/sonic-frr/patch/0004-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch renamed to src/sonic-frr/patch/0004-SONiC-ONLY-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
From ece5d83bebfe2345edf8e18f5af713bd99cc3739 Mon Sep 17 00:00:00 2001
1+
[PATCH] From 0417036a3aece862c95111d4646ca7508a028165 Mon Sep 17
2+
23
From: Ying Xie <[email protected]>
34
Date: Wed, 25 Nov 2020 22:28:43 +0000
4-
Subject: [PATCH] From 0417036a3aece862c95111d4646ca7508a028165 Mon Sep 17
55
00:00:00 2001 Subject: [PATCH] [PATCH 6/8] [frr] remove frr log outchannel to
66
/var/log/frr.log SONiC runs frr inside a docker and the logs are sent to base
77
image via rsyslog and recorded already. There is no need to keep the frr.log
88
inside the docker. It will grow and take all harddrive space eventually.
9-
9+
---
10+
tools/etc/rsyslog.d/45-frr.conf | 24 ------------------------
11+
1 file changed, 24 deletions(-)
1012

1113
diff --git a/tools/etc/rsyslog.d/45-frr.conf b/tools/etc/rsyslog.d/45-frr.conf
1214
index ef37d66d8..2e8e1e12d 100644
@@ -43,6 +45,3 @@ index ef37d66d8..2e8e1e12d 100644
4345
if $programname == 'babeld' or
4446
$programname == 'bgpd' or
4547
$programname == 'bfdd' or
46-
--
47-
2.17.1
48-

src/sonic-frr/patch/0005-Add-support-of-bgp-l3vni-evpn.patch

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
From a0846dcf6f496bcfb51dd11c03d1a6c666d4020a Mon Sep 17 00:00:00 2001
1+
[PATCH] From f5f0018266c98ad96cdbe69ae60d501de21e5600 Mon Sep 17
2+
23
From: Stepan Blyschak <[email protected]>
34
Date: Thu, 20 Oct 2022 13:19:31 +0000
4-
Subject: [PATCH] From f5f0018266c98ad96cdbe69ae60d501de21e5600 Mon Sep 17
55
00:00:00 2001 Subject: [PATCH] From 369bbb4d62aa47d5a6d5157ca6ea819c4cb80f15
66
Mon Sep 17 00:00:00 2001 Subject: [PATCH 07/13] Added support of L3VNI EVPN
77

88
This is temp patch till Prefix to ARP indirection is add in neighorch
99

1010
Signed-off-by: Kishore Kunal <[email protected]>
1111
Signed-off-by: Stepan Blyschak <[email protected]>
12+
---
13+
lib/nexthop.c | 1 +
14+
lib/nexthop.h | 7 ++++++-
15+
zebra/rt_netlink.c | 15 ++++++++++++++-
16+
zebra/zapi_msg.c | 4 ++++
17+
zebra/zebra_dplane.c | 2 +-
18+
5 files changed, 26 insertions(+), 3 deletions(-)
1219

1320
diff --git a/lib/nexthop.c b/lib/nexthop.c
14-
index 6fe45b2c5..527248a74 100644
21+
index 9381b3a89..39da310de 100644
1522
--- a/lib/nexthop.c
1623
+++ b/lib/nexthop.c
17-
@@ -851,6 +851,7 @@ void nexthop_copy_no_recurse(struct nexthop *copy,
24+
@@ -887,6 +887,7 @@ void nexthop_copy_no_recurse(struct nexthop *copy,
1825
memcpy(&copy->rmap_src, &nexthop->rmap_src, sizeof(nexthop->rmap_src));
1926
memcpy(&copy->rmac, &nexthop->rmac, sizeof(nexthop->rmac));
2027
copy->rparent = rparent;
@@ -23,7 +30,7 @@ index 6fe45b2c5..527248a74 100644
2330
nexthop_add_labels(copy, nexthop->nh_label_type,
2431
nexthop->nh_label->num_labels,
2532
diff --git a/lib/nexthop.h b/lib/nexthop.h
26-
index cea7c77e3..65056cd55 100644
33+
index 4b34ad85a..8fde85019 100644
2734
--- a/lib/nexthop.h
2835
+++ b/lib/nexthop.h
2936
@@ -52,6 +52,11 @@ enum nh_encap_type {
@@ -48,18 +55,18 @@ index cea7c77e3..65056cd55 100644
4855

4956
/* EVPN router's MAC.
5057
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
51-
index d696b1985..f12b324e0 100644
58+
index e9f5bcb7a..12a790025 100644
5259
--- a/zebra/rt_netlink.c
5360
+++ b/zebra/rt_netlink.c
54-
@@ -2131,6 +2131,7 @@ static int netlink_route_nexthop_encap(bool fpm, struct nlmsghdr *n,
61+
@@ -2213,6 +2213,7 @@ static int netlink_route_nexthop_encap(bool fpm, struct nlmsghdr *n,
5562
size_t nlen, const struct nexthop *nh)
5663
{
5764
struct rtattr *nest;
5865
+ struct vxlan_nh_encap* encap_data;
5966

6067
if (!fpm)
6168
return true;
62-
@@ -2144,8 +2145,20 @@ static int netlink_route_nexthop_encap(bool fpm, struct nlmsghdr *n,
69+
@@ -2226,8 +2227,20 @@ static int netlink_route_nexthop_encap(bool fpm, struct nlmsghdr *n,
6370
if (!nest)
6471
return false;
6572

@@ -82,10 +89,10 @@ index d696b1985..f12b324e0 100644
8289
break;
8390
}
8491
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
85-
index e9d554ba3..239b9472b 100644
92+
index 3a27802b5..0e12909ec 100644
8693
--- a/zebra/zapi_msg.c
8794
+++ b/zebra/zapi_msg.c
88-
@@ -1662,6 +1662,8 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh,
95+
@@ -1650,6 +1650,8 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh,
8996
* the nexthop and associated MAC need to be installed.
9097
*/
9198
if (CHECK_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_EVPN)) {
@@ -94,7 +101,7 @@ index e9d554ba3..239b9472b 100644
94101
SET_FLAG(nexthop->flags, NEXTHOP_FLAG_EVPN);
95102
nexthop->rmac = api_nh->rmac;
96103
}
97-
@@ -1691,6 +1693,8 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh,
104+
@@ -1679,6 +1681,8 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh,
98105
* the nexthop and associated MAC need to be installed.
99106
*/
100107
if (CHECK_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_EVPN)) {
@@ -104,7 +111,7 @@ index e9d554ba3..239b9472b 100644
104111
nexthop->rmac = api_nh->rmac;
105112
}
106113
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
107-
index 9c252cc63..92b571c68 100644
114+
index 2763dc3b4..ebedc7b2c 100644
108115
--- a/zebra/zebra_dplane.c
109116
+++ b/zebra/zebra_dplane.c
110117
@@ -3568,7 +3568,7 @@ int dplane_ctx_route_init(struct zebra_dplane_ctx *ctx, enum dplane_op_e op,
@@ -116,6 +123,3 @@ index 9c252cc63..92b571c68 100644
116123
}
117124
}
118125

119-
--
120-
2.17.1
121-

src/sonic-frr/patch/0006-Link-local-scope-was-not-set-while-binding-socket-for-bgp-ipv6-link-local-neighbors.patch renamed to src/sonic-frr/patch/0006-SONiC-ONLY-Link-local-scope-was-not-set-while-binding-socket-for-bgp-ipv6-link-local-neighbors.patch

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
From 4fdb386b2b41278ca10431fe2b386853985aff0f Mon Sep 17 00:00:00 2001
1+
[PATCH] From 92ab2d74fca06f86c00d886ac249f7f2d89e93fe Mon Sep 17
2+
23
From: Akhilesh Samineni <[email protected]>
34
Date: Mon, 5 Apr 2021 13:21:40 -0700
4-
Subject: [PATCH] From 92ab2d74fca06f86c00d886ac249f7f2d89e93fe Mon Sep 17
55
00:00:00 2001 Subject: [PATCH 8/8] Link local scope was not set while binding
66
socket with local address causing socket errors for bgp ipv6 link local
77
neighbors.
8-
8+
---
9+
bgpd/bgp_network.c | 5 +++++
10+
1 file changed, 5 insertions(+)
911

1012
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
11-
index 3df4aa286..8b0901fa6 100644
13+
index d535c3d87..c9b019424 100644
1214
--- a/bgpd/bgp_network.c
1315
+++ b/bgpd/bgp_network.c
14-
@@ -742,6 +742,11 @@ int bgp_update_address(struct interface *ifp, const union sockunion *dst,
16+
@@ -753,6 +753,11 @@ int bgp_update_address(struct interface *ifp, const union sockunion *dst,
1517
return 1;
1618

1719
prefix2sockunion(sel, addr);
@@ -23,6 +25,3 @@ index 3df4aa286..8b0901fa6 100644
2325
return 0;
2426
}
2527

26-
--
27-
2.17.1
28-

src/sonic-frr/patch/0007-ignore-route-from-default-table.patch renamed to src/sonic-frr/patch/0007-SONiC-ONLY-ignore-route-from-default-table.patch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
From 1a639f2dcd400997345dab424a2adbc091752661 Mon Sep 17 00:00:00 2001
1+
[PATCH] From ca66350aecf7db3354019480d11754fabae3a97c Mon Sep 17
2+
23
From: Stepan Blyschak <[email protected]>
34
Date: Thu, 20 Oct 2022 13:07:18 +0000
4-
Subject: [PATCH] From ca66350aecf7db3354019480d11754fabae3a97c Mon Sep 17
55
00:00:00 2001 Subject: [PATCH 09/13] ignore route from default table
66

77
Signed-off-by: Stepan Blyschak <[email protected]>
8+
---
9+
zebra/dplane_fpm_nl.c | 9 +++++++++
10+
1 file changed, 9 insertions(+)
811

912
diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c
10-
index b8dbabb60..3332638cc 100644
13+
index 41f603a9e..74225e6cb 100644
1114
--- a/zebra/dplane_fpm_nl.c
1215
+++ b/zebra/dplane_fpm_nl.c
13-
@@ -944,6 +944,15 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
16+
@@ -965,6 +965,15 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
1417
|| op == DPLANE_OP_NH_UPDATE))
1518
return 0;
1619

@@ -25,7 +28,4 @@ index b8dbabb60..3332638cc 100644
2528
+
2629
nl_buf_len = 0;
2730

28-
frr_mutex_lock_autounlock(&fnc->obuf_mutex);
29-
--
30-
2.17.1
31-
31+
/*

src/sonic-frr/patch/0008-Use-vrf_id-for-vrf-not-tabled_id.patch renamed to src/sonic-frr/patch/0008-SONiC-ONLY-Use-vrf_id-for-vrf-not-tabled_id.patch

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
From 44f3736ee601e06e43e978fa075402c3da4823bd Mon Sep 17 00:00:00 2001
1+
[PATCH] From 349e3f758860be0077b69919c39764d3486ec44a Mon Sep 17
2+
23
From: Stepan Blyschak <[email protected]>
34
Date: Mon, 16 Jan 2023 11:45:19 +0000
4-
Subject: [PATCH] From 349e3f758860be0077b69919c39764d3486ec44a Mon Sep 17
55
00:00:00 2001 Subject: [PATCH] use vrf id instead of table id
66

77
Signed-off-by: Stepan Blyschak <[email protected]>
88
---
9-
zebra/rt_netlink.c | 72 +++++++++++++++++++++++++++++++++++++++++++---------
10-
1 file changed, 59 insertions(+), 13 deletions(-)
9+
zebra/rt_netlink.c | 49 +++++++++++++++++++++++++++++++++++++++++++------
10+
1 file changed, 43 insertions(+), 6 deletions(-)
1111

1212
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
13-
index f12b324e0..9b0599899 100644
13+
index 12a790025..30e8a5245 100644
1414
--- a/zebra/rt_netlink.c
1515
+++ b/zebra/rt_netlink.c
16-
@@ -385,6 +385,31 @@ static inline int proto2zebra(int proto, int family, bool is_nexthop)
16+
@@ -391,6 +391,31 @@ static inline int proto2zebra(int proto, int family, bool is_nexthop)
1717
return proto;
1818
}
1919

@@ -45,7 +45,7 @@ index f12b324e0..9b0599899 100644
4545
/**
4646
* @parse_encap_mpls() - Parses encapsulated mpls attributes
4747
* @tb: Pointer to rtattr to look for nested items in.
48-
@@ -2530,12 +2564,24 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, struct zebra_dplane_ctx *ctx
48+
@@ -2612,12 +2637,24 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, struct zebra_dplane_ctx *ctx
4949

5050
/* Table corresponding to this route. */
5151
table_id = dplane_ctx_get_table(ctx);
@@ -74,6 +74,5 @@ index f12b324e0..9b0599899 100644
7474
+ return 0;
7575
+ }
7676
}
77-
77+
7878
if (IS_ZEBRA_DEBUG_KERNEL)
79-
zlog_debug(

0 commit comments

Comments
 (0)