Skip to content

Commit a31ee03

Browse files
FRR patches to support IPv6 Link local enhancements. (sonic-net#5584)
As per HLD - sonic-net/SONiC#625 FRR Patches: 0009-Link-local-scope-was-not-set-while-binding-socket-for-bgp-ipv6-link-local-neighbors.patch Files modified : bgpd_network.c and bgpd/bgp_zebra.c Fix for : Link local scope was not set while binding socket with local address causing socket errors for bgp ipv6 link local neighbors. 0010-VRF-interface-lookup-was-still-done-in-the-default-vrf.patch Files modified : staticd/static_zebra.c Fix for : VRF interface lookup was still done in the default-vrf which was causing the interface lookup to fail. Due to this static-route pointing to link-local was not getting installed. 0011-Changes-to-send-ipv6-link-local-address-as-nexthop-to-fpmsyncd.patch Files modified : zebra/zebra_fpm_netlink.c Fix for : Made changes to send ipv6 address as nexthop to fpmsyncd. Depends on: sonic-net/sonic-utilities#1159 sonic-net/sonic-swss#1463 Signed-off-by: Akhilesh Samineni [email protected]
1 parent 950c24c commit a31ee03

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 4b45abcdb107c8c5d58fd63a2616c54c800305b3 Mon Sep 17 00:00:00 2001
2+
From: Akhilesh Samineni <[email protected]>
3+
Date: Mon, 5 Apr 2021 13:21:40 -0700
4+
Subject: [PATCH] Link local scope was not set while binding socket with local
5+
address causing socket errors for bgp ipv6 link local neighbors.
6+
7+
---
8+
bgpd/bgp_network.c | 5 +++++
9+
bgpd/bgp_zebra.c | 3 +++
10+
2 files changed, 8 insertions(+)
11+
12+
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
13+
index 6a5c2c4b3..d7047a154 100644
14+
--- a/bgpd/bgp_network.c
15+
+++ b/bgpd/bgp_network.c
16+
@@ -556,6 +556,11 @@ static int bgp_update_address(struct interface *ifp, const union sockunion *dst,
17+
return 1;
18+
19+
prefix2sockunion(sel, addr);
20+
+
21+
+ if (IN6_IS_ADDR_LINKLOCAL(&addr->sin6.sin6_addr)) {
22+
+ addr->sin6.sin6_scope_id = ifp->ifindex;
23+
+ }
24+
+
25+
return 0;
26+
}
27+
28+
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
29+
index e42d6ee26..8e9fa8903 100644
30+
--- a/bgpd/bgp_zebra.c
31+
+++ b/bgpd/bgp_zebra.c
32+
@@ -814,6 +814,9 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
33+
? peer->conf_if
34+
: peer->ifname,
35+
peer->bgp->vrf_id);
36+
+ else if (peer->update_if)
37+
+ ifp = if_lookup_by_name(peer->update_if,
38+
+ peer->bgp->vrf_id);
39+
} else if (peer->update_if)
40+
ifp = if_lookup_by_name(peer->update_if,
41+
peer->bgp->vrf_id);
42+
--
43+
2.18.0
44+

src/sonic-frr/patch/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch
77
0008-Add-support-of-bgp-l3vni-evpn.patch
88
0009-Add-bgp-bestpath-peer-type-multipath-relax.patch
9+
0009-Link-local-scope-was-not-set-while-binding-socket-for-bgp-ipv6-link-local-neighbors.patch

0 commit comments

Comments
 (0)