diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-13 13:10:32 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-13 13:10:32 -0400 |
| commit | e6fda497d36365ef9b5adcbb9f59c397d0c7f5c5 (patch) | |
| tree | b07d9bd58b55ef5b9268d75e3127827573181be0 /zebra/client_main.c | |
| parent | 645bb0b10e8144a2b40201e4da6e200d5663b886 (diff) | |
*: 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 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; |
