diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-13 19:10:32 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-13 19:10:32 +0200 |
commit | e6fda497d36365ef9b5adcbb9f59c397d0c7f5c5 (patch) | |
tree | b07d9bd58b55ef5b9268d75e3127827573181be0 /zebra/client_main.c | |
parent | Merge branch 'stable/3.0' (diff) | |
download | frr-e6fda497d36365ef9b5adcbb9f59c397d0c7f5c5.tar.xz frr-e6fda497d36365ef9b5adcbb9f59c397d0c7f5c5.zip |
*: Clean up call into inet_aton
In the few places where we were not checking the return code
for inet_aton, do so.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/client_main.c')
-rw-r--r-- | zebra/client_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/client_main.c b/zebra/client_main.c index c9d738bb0..0e77ea4ae 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; |