Check for dstip before using it. Fixes #1.

This commit is contained in:
ValdikSS
2017-04-12 19:31:15 +03:00
parent 83a04ad79d
commit b244ff9313

View File

@@ -211,7 +211,7 @@ int main ( int argc, char* argv[] ) {
err = 1; err = 1;
} }
if(srcip != NULL) { if(srcip != NULL && dstip != NULL) {
if(is_v6(srcip) != is_v6(dstip)) { if(is_v6(srcip) != is_v6(dstip)) {
fprintf(stderr, "Bind ip and destination ip must be both v4 or v6 and can't be mixed!\n"); fprintf(stderr, "Bind ip and destination ip must be both v4 or v6 and can't be mixed!\n");
err = 1; err = 1;