summaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet/arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ethernet/arp.c')
-rw-r--r--src/vnet/ethernet/arp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index 8df96f6a0f1..55beb7025dd 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -628,9 +628,15 @@ vnet_arp_set_ip4_over_ethernet_internal (vnet_main_t * vnm,
e->time_last_updated = vlib_time_now (vm);
if (is_static)
- e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC;
+ {
+ e->flags &= ~ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC;
+ e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC;
+ }
else
- e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC;
+ {
+ e->flags &= ~ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC;
+ e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC;
+ }
adj_nbr_walk_nh4 (sw_if_index, &e->ip4_address, arp_mk_complete_walk, e);
@@ -1819,7 +1825,7 @@ vnet_arp_flush_ip4_over_ethernet_internal (vnet_main_t * vnm,
*/
if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC)
{
- e->flags &= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC;
+ e->flags &= ~ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC;
}
else if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC)
{