aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-06-11 01:39:08 -0700
committerDamjan Marion <dmarion@me.com>2019-06-11 09:52:28 +0000
commit4f3c1042667a77e9c19dfbd51d3922cb5d37ea18 (patch)
treea9ae89b32937e23a0406e3a46bd3f9e72f4ce513 /src/vnet
parent54ee6d1c130e10ec9adc19955ea95205a8b835de (diff)
ip: punt coverity fix of CLI input
Type: fix Change-Id: Ia73cbe2fba0a364d966daed0b5d5d2ac7499f86d Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ip/punt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/ip/punt.c b/src/vnet/ip/punt.c
index 6f321507efe..b057a53306e 100644
--- a/src/vnet/ip/punt.c
+++ b/src/vnet/ip/punt.c
@@ -551,7 +551,10 @@ punt_socket_register_cmd (vlib_main_t * vm,
}
}
- error = vnet_punt_socket_add (vm, 1, &pr, (char *) socket_name);
+ if (!socket_name)
+ error = clib_error_return (0, "socket name not specified");
+ else
+ error = vnet_punt_socket_add (vm, 1, &pr, (char *) socket_name);
done:
return error;