e = pool_elt_at_index (am->ip4_entry_pool, p[0]);
/* Refuse to over-write static arp. */
- if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC)
+ if (!is_static &&
+ (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC))
return -2;
make_new_arp_cache_entry = 0;
}
{
if (!e)
clib_warning("Adjacency contains unknown ARP next hop %U (del)",
- format_ip4_address, &adj->arp.next_hop);
+ format_ip46_address, &adj->arp.next_hop);
else
arp_ip4_entry_del_adj(e, adj->heap_handle);
}
{
if (!e)
clib_warning("Adjacency contains unknown ARP next hop %U (add)",
- format_ip4_address, &adj->arp.next_hop);
+ format_ip46_address, &adj->arp.next_hop);
else
arp_ip4_entry_add_adj(e, adj->heap_handle);
}
memset(&args, 0, sizeof(args));
clib_memcpy(&add_adj, adj, sizeof(add_adj));
- add_adj.arp.next_hop.ip4.as_u32 = next_hop->as_u32; /* install neighbor /32 route */
+ ip46_address_set_ip4(&add_adj.arp.next_hop, next_hop); /* install neighbor /32 route */
args.table_index_or_table_id = fib_index;
args.flags = IP4_ROUTE_FLAG_FIB_INDEX | IP4_ROUTE_FLAG_ADD| IP4_ROUTE_FLAG_NEIGHBOR;
args.dst_address.as_u32 = next_hop->as_u32;
VLIB_CLI_COMMAND (ip_arp_add_del_command, static) = {
.path = "set ip arp",
- .short_help = "set ip arp [del] <intfc> <ip-address> <mac-address>",
+ .short_help = "set ip arp [del] <intfc> <ip-address> <mac-address> [static] [count <count>] [fib-id <fib-id>] [proxy <lo-addr> - <hi-addr>]",
.function = ip_arp_add_del_command_fn,
};