diff options
Diffstat (limited to 'networking/traceroute.c')
-rw-r--r-- | networking/traceroute.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c index 82bb0118c..55dc15b66 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -482,7 +482,7 @@ send_probe(int seq, int ttl) | |||
482 | if (!(option_mask32 & OPT_USE_ICMP)) { | 482 | if (!(option_mask32 & OPT_USE_ICMP)) { |
483 | out = outdata; | 483 | out = outdata; |
484 | len -= sizeof(*outudp); | 484 | len -= sizeof(*outudp); |
485 | set_nport(dest_lsa, htons(port + seq)); | 485 | set_nport(&dest_lsa->u.sa, htons(port + seq)); |
486 | } | 486 | } |
487 | } | 487 | } |
488 | 488 | ||
@@ -1018,10 +1018,10 @@ common_traceroute_main(int op, char **argv) | |||
1018 | int probe_fd = xsocket(af, SOCK_DGRAM, 0); | 1018 | int probe_fd = xsocket(af, SOCK_DGRAM, 0); |
1019 | if (op & OPT_DEVICE) | 1019 | if (op & OPT_DEVICE) |
1020 | setsockopt_bindtodevice(probe_fd, device); | 1020 | setsockopt_bindtodevice(probe_fd, device); |
1021 | set_nport(dest_lsa, htons(1025)); | 1021 | set_nport(&dest_lsa->u.sa, htons(1025)); |
1022 | /* dummy connect. makes kernel pick source IP (and port) */ | 1022 | /* dummy connect. makes kernel pick source IP (and port) */ |
1023 | xconnect(probe_fd, &dest_lsa->u.sa, dest_lsa->len); | 1023 | xconnect(probe_fd, &dest_lsa->u.sa, dest_lsa->len); |
1024 | set_nport(dest_lsa, htons(port)); | 1024 | set_nport(&dest_lsa->u.sa, htons(port)); |
1025 | 1025 | ||
1026 | /* read IP and port */ | 1026 | /* read IP and port */ |
1027 | source_lsa = get_sock_lsa(probe_fd); | 1027 | source_lsa = get_sock_lsa(probe_fd); |
@@ -1031,7 +1031,7 @@ common_traceroute_main(int op, char **argv) | |||
1031 | close(probe_fd); | 1031 | close(probe_fd); |
1032 | 1032 | ||
1033 | /* bind our sockets to this IP (but not port) */ | 1033 | /* bind our sockets to this IP (but not port) */ |
1034 | set_nport(source_lsa, 0); | 1034 | set_nport(&source_lsa->u.sa, 0); |
1035 | xbind(sndsock, &source_lsa->u.sa, source_lsa->len); | 1035 | xbind(sndsock, &source_lsa->u.sa, source_lsa->len); |
1036 | xbind(rcvsock, &source_lsa->u.sa, source_lsa->len); | 1036 | xbind(rcvsock, &source_lsa->u.sa, source_lsa->len); |
1037 | 1037 | ||