diff options
author | Pierre Beyssac <pb@FreeBSD.org> | 2004-04-17 18:44:23 +0000 |
---|---|---|
committer | Pierre Beyssac <pb@FreeBSD.org> | 2004-04-17 18:44:23 +0000 |
commit | bc5cfff9338e804a31a5d3bd3c270e86c4308b1f (patch) | |
tree | fda97456e194a8130901474e84767df92bddd3d3 /contrib/traceroute | |
parent | 4f31891e2de44677ee4f98d72102f671565bb46b (diff) | |
download | src-test-bc5cfff9338e804a31a5d3bd3c270e86c4308b1f.tar.gz src-test-bc5cfff9338e804a31a5d3bd3c270e86c4308b1f.zip |
Check -s option source address for validity.
PR: bin/29026
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=128365
Diffstat (limited to 'contrib/traceroute')
-rw-r--r-- | contrib/traceroute/traceroute.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c index 5044eabb1d165..cfb3af41b44e1 100644 --- a/contrib/traceroute/traceroute.c +++ b/contrib/traceroute/traceroute.c @@ -880,13 +880,13 @@ main(int argc, char **argv) } outip->ip_src = from->sin_addr; -#ifndef IP_HDRINCL + + /* Check the source address (-s), if any, is valid */ if (bind(sndsock, (struct sockaddr *)from, sizeof(*from)) < 0) { Fprintf(stderr, "%s: bind: %s\n", prog, strerror(errno)); exit (1); } -#endif #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) if (setpolicy(sndsock, "in bypass") < 0) |