aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ethernet/arp_packet.h
diff options
context:
space:
mode:
authorPierre Pfister <ppfister@cisco.com>2016-06-22 12:58:30 +0100
committerChris Luke <chris_luke@cable.comcast.com>2016-06-22 17:09:33 +0000
commitd076f19b5e119265d995a031707c8d78608c439f (patch)
treeed5c48a979a26534da3b6228b5f71ae5e506c84a /vnet/vnet/ethernet/arp_packet.h
parent5b7a563ff0a39b74a0f037572b7709e3c9aa5cf2 (diff)
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>
Diffstat (limited to 'vnet/vnet/ethernet/arp_packet.h')
-rw-r--r--vnet/vnet/ethernet/arp_packet.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/vnet/vnet/ethernet/arp_packet.h b/vnet/vnet/ethernet/arp_packet.h
index c2214949d89..b3447c5e1c1 100644
--- a/vnet/vnet/ethernet/arp_packet.h
+++ b/vnet/vnet/ethernet/arp_packet.h
@@ -109,7 +109,8 @@ typedef enum {
IP4_ARP_ERROR_REQUEST_SENT,
IP4_ARP_ERROR_NON_ARP_ADJ,
IP4_ARP_ERROR_REPLICATE_DROP,
- IP4_ARP_ERROR_REPLICATE_FAIL
+ IP4_ARP_ERROR_REPLICATE_FAIL,
+ IP4_ARP_ERROR_NO_SOURCE_ADDRESS,
} ip4_arp_error_t;
typedef CLIB_PACKED (struct {