aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/ip/ip_sas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/ip/ip_sas.c b/src/vnet/ip/ip_sas.c
index 0fc261724f1..01f6c90baf8 100644
--- a/src/vnet/ip/ip_sas.c
+++ b/src/vnet/ip/ip_sas.c
@@ -54,6 +54,8 @@ ip6_sas_commonlen (const ip6_address_t *a1, const ip6_address_t *a2)
static int
ip4_sas_commonlen (const ip4_address_t *a1, const ip4_address_t *a2)
{
+ if (!a1 || !a2)
+ return 0;
u64 a =
clib_net_to_host_u32 (a1->as_u32) ^ clib_net_to_host_u32 (a2->as_u32);
if (a == 0)