summaryrefslogtreecommitdiff
path: root/pbrd/pbr_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbrd/pbr_vty.c')
-rw-r--r--pbrd/pbr_vty.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c
index c4e36ebd46..ee9ee32f8b 100644
--- a/pbrd/pbr_vty.c
+++ b/pbrd/pbr_vty.c
@@ -199,6 +199,11 @@ DEFPY(pbr_map_match_ip_proto, pbr_map_match_ip_proto_cmd,
return CMD_WARNING_CONFIG_FAILED;
if (!no) {
+ if (!ip_proto) {
+ vty_out(vty, "Unable to convert (null) to proto id\n");
+ return CMD_WARNING;
+ }
+
p = getprotobyname(ip_proto);
if (!p) {
vty_out(vty, "Unable to convert %s to proto id\n",