Skip to content

Commit

Permalink
Warn when both local and remote addresses are of the same type. Updat…
Browse files Browse the repository at this point in the history
…e changelog.
  • Loading branch information
wojtekka committed Oct 24, 2016
1 parent 29e3d4d commit fc9e10f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 6tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ int main(int argc, char **argv)
pid_file = optarg;
break;
case 'H':
fprintf(stderr, "%s: -H is deprecated, please use proper combination of -4 and -6.\n", argv[0]);
fprintf(stderr, "%s: warning: -H is deprecated, please use proper combination of -4 and -6.\n", argv[0]);
break;
default:
return 1;
Expand Down Expand Up @@ -705,6 +705,12 @@ int main(int argc, char **argv)
source_hint = remote_hint[0];
}

if (source_hint == AF_INET && local_hint == AF_INET)
fprintf(stderr, "%s: warning: both local and remote addresses are IPv4\n", argv[0]);

if (source_hint == AF_INET6 && local_hint == AF_INET6)
fprintf(stderr, "%s: warning: both local and remote addresses are IPv6\n", argv[0]);

tmp = xntop(ai->ai_addr);
debug("resolved to %s\n", tmp);
free(tmp);
Expand Down
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
0.12 (2016-10-24)

Changes by Wojtek Kaniewski <[email protected]>:
- make -4 and -6 work the way they were intended,
- remove -H option, but leave enough information for the users to get the
same result,
- warn when both local and remote address are of the same type.

Changes by Jari Aalto <[email protected]>:
- spelling fixes.

0.11 (2016-02-26)

Changes by Wojtek Kaniewski <[email protected]>:
Expand Down

0 comments on commit fc9e10f

Please sign in to comment.