Merge pull request #2 from ValdikSS/master

Check for dstip before using it. Fixes #1.
This commit is contained in:
T.v.Dein
2017-04-12 20:49:06 +02:00
committed by GitHub

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;