lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 18 Sep 2008 20:00:39 +0300
From:	"Nadav Shemer" <>
Subject: iputils: ping.c - using -I for both interface and address

When I use 'ping -I eth1 -I' the packets come out with
eth1's address anyway.
It seems to me that IP_PKTINFO is set for every packet, with
ipi_spec_dst set to 0. This overrides the inet->saddr set by bind.

Here's a fix:
--- ping.c	2007-11-27 02:57:27.000000000 +0200
+++ ping.c.patched	2008-09-18 19:59:45.000000000 +0300
@@ -350,6 +350,8 @@
 			fprintf(stderr, "ping: unknown iface %s\n", device);
+		if (options & F_STRICTSOURCE)
+			cmsg.ipi.ipi_spec_dst.s_addr = source.sin_addr.s_addr;
 		cmsg.ipi.ipi_ifindex = ifr.ifr_ifindex;
 		cmsg_len = sizeof(cmsg);
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists