patch-1.3.42 linux/net/ipv4/rarp.c

Next file: linux/net/ipv4/raw.c
Previous file: linux/net/ipv4/ip_sockglue.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.41/linux/net/ipv4/rarp.c linux/net/ipv4/rarp.c
@@ -266,7 +266,7 @@
 		sti();
 
 		arp_send(ARPOP_RREPLY, ETH_P_RARP, sip, dev, dev->pa_addr, sha, 
-			dev->dev_addr);
+			dev->dev_addr, sha);
 	}
 	else
 		sti();
@@ -288,6 +288,7 @@
 	int htype, hlen;
 	unsigned long ip;
 	struct rtable *rt;
+	struct device * dev;
   
 	memcpy_fromfs(&r, req, sizeof(r));
   
@@ -326,9 +327,11 @@
  *	Is it reachable directly ?
  */
   
-	rt = ip_rt_route(ip, NULL, NULL);
+	rt = ip_rt_route(ip, 0);
 	if (rt == NULL)
 		return -ENETUNREACH;
+	dev = rt->rt_dev;
+	ip_rt_put(rt);
 
 /*
  *	Is there an existing entry for this address?  Find out...
@@ -366,7 +369,7 @@
 	entry->hlen = hlen;
 	entry->htype = htype;
 	memcpy(&entry->ha, &r.arp_ha.sa_data, hlen);
-	entry->dev = rt->rt_dev;
+	entry->dev = dev;
 
 	sti();  
 
@@ -574,5 +577,4 @@
 		rarp_release_entry(rt);
 	}
 }
-
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this