summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip')
-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;