Hi Jon,
This is not the right behavior. I think it is caused by reuse of a static ARP
entry in the IP4 neighbor pool with static bit still set. The code merely set
the dynamic bit in the flags but left the static bit untouched (similarly for
the static path) in arp.c function vnet_arp_set_ip4_over_ethernet_internal ():
e->time_last_updated = vlib_time_now (vm);
if (is_static)
e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC;
else
e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC;
I spotted another error in the function
vnet_arp_flush_ip4_over_ethernet_internal()
if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC)
{
e->flags &= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC;
}
else if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC)
{
arp_entry_free (eai, e);
}
I believe the “if static” path should be:
e->flags &= ~ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC;
Would you like to submit a patch to fix them?
Regards,
John
From: [email protected] <[email protected]> On Behalf Of Jon Loeliger
Sent: Wednesday, May 09, 2018 2:04 PM
To: vpp-dev <[email protected]>
Subject: [vpp-dev] Static ARP Flag Question
VPP-ers,
Is this expected behavior for the Flags here?
Thanks,
jdl
vpp# set int ip address TenGigabitEthernet6/0/0
10.10.20.1/24<http://10.10.20.1/24>
vpp# set interface state TenGigabitEthernet6/0/0 up
vpp# set ip arp TenGigabitEthernet6/0/0 10.10.20.100 08:00:27:41:a7:56 static
vpp# show ip arp
Time IP4 Flags Ethernet Interface
53.7857 10.10.20.100 S 08:00:27:41:a7:56 TenGigabitEthernet6/0/0
vpp# set ip arp del TenGigabitEthernet6/0/0 10.10.20.100 08:00:27:41:a7:56
static
vpp# show ip arp
vpp# set ip arp TenGigabitEthernet6/0/0 10.10.20.100 08:00:27:41:a7:56
vpp# show ip arp
Time IP4 Flags Ethernet Interface
90.9054 10.10.20.100 SD 08:00:27:41:a7:56 TenGigabitEthernet6/0/0