FRR patches to support IPv6 Link local enhancements. (#5584)

As per HLD - Azure/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:
Azure/sonic-utilities#1159
Azure/sonic-swss#1463

Signed-off-by: Akhilesh Samineni akhilesh.samineni@broadcom.com
This commit is contained in:
Akhilesh Samineni 2021-07-20 20:23:34 +05:30 committed by GitHub
parent 950c24c5ae
commit a31ee03bbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

View File

@ -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

View File

@ -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