]> git.puffer.fish Git - mirror/frr.git/commitdiff
nhrpd: Use nhrp_interface_update_nbma when source vrf was changed 11836/head
authorDmitrii Turlupov <dturlupov@factor-ts.ru>
Fri, 19 Aug 2022 14:12:55 +0000 (17:12 +0300)
committerDmitrii Turlupov <dturlupov@factor-ts.ru>
Mon, 22 Aug 2022 12:54:18 +0000 (15:54 +0300)
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 <dturlupov@factor-ts.ru>
nhrpd/nhrp_interface.c

index 1092ce13a16f08fe413a2ed15fe3b3ce0f79574b..4ac30a7d75ed076aacfda2ad475b70b1b895381a 100644 (file)
@@ -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;