[netfilter-cvslog] r3265 - trunk/patch-o-matic-ng/ROUTE/linux-2.6/net/ipv4/netfilter

gandalf at netfilter.org gandalf at netfilter.org
Wed Nov 10 17:54:36 CET 2004


Author: gandalf at netfilter.org
Date: 2004-11-10 17:54:35 +0100 (Wed, 10 Nov 2004)
New Revision: 3265

Modified:
   trunk/patch-o-matic-ng/ROUTE/linux-2.6/net/ipv4/netfilter/ipt_ROUTE.c
Log:
Patch by: Cedric de Launois <delaunois at info.ucl.ac.be>

SYMPTOM : when a packet is rerouted towards a gateway, the destination
          MAC address of the packet is not change appropriately.

CAUSE : in the route() function of the ROUTE target, a wrong field
        (fl.fld_dst) is used to alter the IP address of the next hop.
        The right field is fl.fl4_dst for IPv4 packets.
        This field only appears for kernels 2.6.x.

SOLUTION :

    modify
       /* The destination address may be overloaded by the target */
       if (route_info->gw)
               fl.fld_dst = route_info->gw;

    by
       /* The destination address may be overloaded by the target */
       if (route_info->gw)
               fl.fl4_dst = route_info->gw;


Modified: trunk/patch-o-matic-ng/ROUTE/linux-2.6/net/ipv4/netfilter/ipt_ROUTE.c
===================================================================
--- trunk/patch-o-matic-ng/ROUTE/linux-2.6/net/ipv4/netfilter/ipt_ROUTE.c	2004-11-08 13:22:16 UTC (rev 3264)
+++ trunk/patch-o-matic-ng/ROUTE/linux-2.6/net/ipv4/netfilter/ipt_ROUTE.c	2004-11-10 16:54:35 UTC (rev 3265)
@@ -4,7 +4,7 @@
  *
  * Copyright (C) 2002 Cedric de Launois <delaunois at info.ucl.ac.be>
  *
- * v 1.9 2004/05/14
+ * v 1.10 2004/11/10
  *
  * This software is distributed under GNU GPL v2, 1991
  */
@@ -69,7 +69,7 @@
 	
 	/* The destination address may be overloaded by the target */
 	if (route_info->gw)
-		fl.fld_dst = route_info->gw;
+		fl.fl4_dst = route_info->gw;
 	
 	/* Trying to route the packet using the standard routing table. */
 	if ((err = ip_route_output_key(&rt, &fl))) {




More information about the netfilter-cvslog mailing list