lkml.org 
[lkml]   [1998]   [Jun]   [20]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSat, 20 Jun 1998 11:03:26 -0400 (EDT)
FromChad C Giffin <>
SubjectICMP Protocol fix for NET/3 implimentation in Linux 2.0.34
     Fixes a bug in source address calculation for outgoing icmp echo. 
The problem is quite visible by just reading the patch file itself. 

    Also attached is a modified bsd ping from D Holland's netkit base.
This ping(8) allows modification of the source address.  (Interface
address)


 Sincerely,

 Chad C Giffin 

[unhandled content-type:application/octet-stream]diff -urN linux-2.0.34.orig/net/ipv4/icmp.c linux-2.0.34/net/ipv4/icmp.c
--- linux-2.0.34.orig/net/ipv4/icmp.c	Wed Jun  3 18:17:50 1998
+++ linux-2.0.34/net/ipv4/icmp.c	Sat Jun 20 10:56:03 1998
@@ -42,6 +42,8 @@
  *              Elliot Poger    :       Added support for SO_BINDTODEVICE.
  *	Willy Konynenberg	:	Transparent proxy adapted to new
  *					socket hash code.
+ *	Chad C Giffin <typo>	:	Fixed typo causing destination address
+ *				:	to clobber requested source address.
  *
  *
  * RFC1122 (Host Requirements -- Comm. Layer) Status:
@@ -604,7 +606,7 @@
 	 *	Construct source address and options.
 	 */
 	 
-	saddr=iph->daddr;
+	saddr=iph->saddr;
 	if(saddr!=dev->pa_addr && ip_chk_addr(saddr)!=IS_MYADDR)
 		saddr=dev->pa_addr;
 	if(ip_options_echo(&icmp_param.replyopts, NULL, saddr, iph->saddr, skb_in))
\
 
 \ /
  Last update: 2005-03-22 12:43    [from the cache]
©2003-2008