Skip to content

Commit

Permalink
Merge pull request #2227 from chrisd8088/radwho_check_inet_pton_ret
Browse files Browse the repository at this point in the history
Print usage and exit when -N used with invalid IP.
  • Loading branch information
alandekok committed May 8, 2018
2 parents 6ebe977 + d185ceb commit c3e7f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/radwho.c
Expand Up @@ -233,7 +233,7 @@ int main(int argc, char **argv)
showname = 0;
break;
case 'N':
if (inet_pton(AF_INET, optarg, &nas_ip_address) < 0) {
if (inet_pton(AF_INET, optarg, &nas_ip_address) <= 0) {
usage(1);
}
break;
Expand Down

0 comments on commit c3e7f60

Please sign in to comment.