mirror of https://github.com/mirror/busybox.git
traceroute6: restore port after probing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>1_16_stable
parent
75b7397675
commit
f42fa1b21e
|
@ -1020,6 +1020,7 @@ common_traceroute_main(int op, char **argv)
|
||||||
set_nport(dest_lsa, htons(1025));
|
set_nport(dest_lsa, htons(1025));
|
||||||
/* dummy connect. makes kernel pick source IP (and port) */
|
/* dummy connect. makes kernel pick source IP (and port) */
|
||||||
xconnect(probe_fd, &dest_lsa->u.sa, dest_lsa->len);
|
xconnect(probe_fd, &dest_lsa->u.sa, dest_lsa->len);
|
||||||
|
set_nport(dest_lsa, htons(port));
|
||||||
|
|
||||||
/* read IP and port */
|
/* read IP and port */
|
||||||
source_lsa = get_sock_lsa(probe_fd);
|
source_lsa = get_sock_lsa(probe_fd);
|
||||||
|
|
Loading…
Reference in New Issue