From 8d1d3fdf7bbd8e12a2597fd6d1b3e36fc7e32fd4 Mon Sep 17 00:00:00 2001 From: Dmitrii Turlupov Date: Fri, 19 Aug 2022 17:12:55 +0300 Subject: [PATCH] nhrpd: Use nhrp_interface_update_nbma when source vrf was changed 1. Run frr: interface enp0s8 ip address 193.168.1.2/24 exit ! interface gre1 ip address 10.8.1.2/32 ip nhrp network-id 1 ip nhrp nhs dynamic nbma 193.168.1.1 tunnel source enp0s8 exit Log: NHS: Register 10.8.1.2 -> 10.8.1.2 (timeout 2) Send Registration-Request(3) 10.8.1.2 -> 10.8.1.2 Recv Registration-Reply(4) 10.8.1.1 -> 10.8.1.2 2. Create VRF and move enp0s8 to VRF ip link set enp0s8 master vrf1 Before patch: NHS: Waiting link for 193.168.1.1 After patch: NHS: Register 10.8.1.2 -> 10.8.1.2 (timeout 2) Signed-off-by: Dmitrii Turlupov --- nhrpd/nhrp_interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c index 1092ce13a1..4ac30a7d75 100644 --- a/nhrpd/nhrp_interface.c +++ b/nhrpd/nhrp_interface.c @@ -165,8 +165,7 @@ static void nhrp_interface_interface_notifier(struct notifier_block *n, switch (cmd) { case NOTIFY_INTERFACE_CHANGED: - nhrp_interface_update_mtu(nifp->ifp, AFI_IP); - nhrp_interface_update_source(nifp->ifp); + nhrp_interface_update_nbma(nifp->ifp, NULL); break; case NOTIFY_INTERFACE_ADDRESS_CHANGED: nifp->nbma = nbmanifp->afi[AFI_IP].addr; -- 2.39.5