Skip to content

Commit

Permalink
FRR patches to support IPv6 Link local enhancements. (sonic-net#5584)
Browse files Browse the repository at this point in the history
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 akhilesh.samineni@broadcom.com
  • Loading branch information
AkhileshSamineni authored and Carl Keene committed Aug 7, 2021
1 parent 90d7821 commit 873d5fb
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 4b45abcdb107c8c5d58fd63a2616c54c800305b3 Mon Sep 17 00:00:00 2001
From: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
Date: Mon, 5 Apr 2021 13:21:40 -0700
Subject: [PATCH] Link local scope was not set while binding socket with local
address causing socket errors for bgp ipv6 link local neighbors.

---
bgpd/bgp_network.c | 5 +++++
bgpd/bgp_zebra.c | 3 +++
2 files changed, 8 insertions(+)

diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 6a5c2c4b3..d7047a154 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -556,6 +556,11 @@ static int bgp_update_address(struct interface *ifp, const union sockunion *dst,
return 1;

prefix2sockunion(sel, addr);
+
+ if (IN6_IS_ADDR_LINKLOCAL(&addr->sin6.sin6_addr)) {
+ addr->sin6.sin6_scope_id = ifp->ifindex;
+ }
+
return 0;
}

diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index e42d6ee26..8e9fa8903 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -814,6 +814,9 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
? peer->conf_if
: peer->ifname,
peer->bgp->vrf_id);
+ else if (peer->update_if)
+ ifp = if_lookup_by_name(peer->update_if,
+ peer->bgp->vrf_id);
} else if (peer->update_if)
ifp = if_lookup_by_name(peer->update_if,
peer->bgp->vrf_id);
--
2.18.0

1 change: 1 addition & 0 deletions src/sonic-frr/patch/series
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch
0008-Add-support-of-bgp-l3vni-evpn.patch
0009-Add-bgp-bestpath-peer-type-multipath-relax.patch
0009-Link-local-scope-was-not-set-while-binding-socket-for-bgp-ipv6-link-local-neighbors.patch

0 comments on commit 873d5fb

Please sign in to comment.