ARP/NDP does not send solicitation when no source address is available 02/1702/4
authorPierre Pfister <ppfister@cisco.com>
Wed, 22 Jun 2016 11:58:30 +0000 (12:58 +0100)
committerChris Luke <chris_luke@cable.comcast.com>
Wed, 22 Jun 2016 17:09:33 +0000 (17:09 +0000)
commitd076f19b5e119265d995a031707c8d78608c439f
treeed5c48a979a26534da3b6228b5f71ae5e506c84a
parent5b7a563ff0a39b74a0f037572b7709e3c9aa5cf2
ARP/NDP does not send solicitation when no source address is available

Currently, when the interface has no address assigned to it,
VPP crashes as ip_interface_address_for_packet assumes there
always is at least one address.

This patch checks if an address is available at all.
The only part of VPP using it is ARP or NDP.
When a neighbor discovery message has to be sent while
there is no address assigned on the interace, no
solicitation is sent and an error counter is incremented.

Change-Id: Ia9fdaf8e84050a1ceeb47f5370819d3df95714f0
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
vnet/vnet/ethernet/arp_packet.h
vnet/vnet/ip/ip4.h
vnet/vnet/ip/ip4_forward.c
vnet/vnet/ip/ip6.h
vnet/vnet/ip/ip6_forward.c
vnet/vnet/ip/lookup.h