summaryrefslogtreecommitdiff
path: root/zebra/client_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/client_main.c')
-rw-r--r--zebra/client_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/client_main.c b/zebra/client_main.c
index c9d738bb08..0e77ea4aec 100644
--- a/zebra/client_main.c
+++ b/zebra/client_main.c
@@ -48,7 +48,12 @@ zebra_test_ipv4 (int command, int type, char *prefix, char *gateway,
struct in_addr *gpnt;
str2prefix_ipv4 (prefix, &p);
- inet_aton (gateway, &gate);
+ if (!inet_aton (gateway, &gate))
+ {
+ printf("Gateway specified: %s is illegal\n", gateway);
+ return;
+ }
+
gpnt = &gate;
api.vrf_id = VRF_DEFAULT;