diff --git a/spipe/main.c b/spipe/main.c index 6f35141d..79dc231e 100644 --- a/spipe/main.c +++ b/spipe/main.c @@ -13,6 +13,7 @@ #include "graceful_shutdown.h" #include "parsenum.h" #include "sock.h" +#include "sock_util.h" #include "warnp.h" #include "proto_conn.h" @@ -221,7 +222,9 @@ main(int argc, char * argv[]) usage(); if (!(opt_o > 0.0)) usage(); - if (opt_t == NULL) + if (sock_addr_validate(opt_t)) + usage(); + if (opt_b && sock_addr_validate(opt_b)) usage(); /* Initialize the "events & threads" cookie. */ diff --git a/spiped/main.c b/spiped/main.c index d3efe7a8..fb6e39af 100644 --- a/spiped/main.c +++ b/spiped/main.c @@ -13,6 +13,7 @@ #include "parsenum.h" #include "setuidgid.h" #include "sock.h" +#include "sock_util.h" #include "warnp.h" #include "dispatch.h" @@ -239,9 +240,11 @@ main(int argc, char * argv[]) usage(); if ((opt_r != 60.0) && opt_R) usage(); - if (opt_s == NULL) + if (sock_addr_validate(opt_s)) usage(); - if (opt_t == NULL) + if (sock_addr_validate(opt_t)) + usage(); + if (opt_b && sock_addr_validate(opt_b)) usage(); /*