Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.5.47 /net/bridge/br_netfilter.c

Filename:/net/bridge/br_netfilter.c
Lines Added:8
Lines Deleted:4
Also changed in: (Previous) 2.5.46bk3  2.5.46bk2  2.5.45 
(Following) 2.5.51  2.5.67-bk3  2.5.67-bk4  2.5.67-bk5  2.5.67-bk6  2.5.67-bk7 

Location
[  2.5.47
  [  net
    [  bridge
       o  br_netfilter.c

Patch

diff -Nru a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
--- a/net/bridge/br_netfilter.c   Sun Nov 10 19:28:41 2002
+++ b/net/bridge/br_netfilter.c   Sun Nov 10 19:28:41 2002
@@ -57,7 +57,8 @@
       dst: {
          __refcnt:      ATOMIC_INIT(1),
          dev:         &__fake_net_device,
-         pmtu:         1500
+         path:         &__fake_rtable.u.dst,
+         metrics:      {[RTAX_MTU] 1500},
       }
    },
 
@@ -109,8 +110,8 @@
  * Let us now consider the case that ip_route_input() fails:
  *
  * After a "echo '0' > /proc/sys/net/ipv4/ip_forward" ip_route_input()
- * will fail, while ip_route_output() will return success. The source
- * address for ip_route_output() is set to zero, so ip_route_output()
+ * will fail, while __ip_route_output_key() will return success. The source
+ * address for __ip_route_output_key() is set to zero, so __ip_route_output_key
  * thinks we're handling a locally generated packet and won't care
  * if IP forwarding is allowed. We send a warning message to the users's
  * log telling her to put IP forwarding on.
@@ -158,8 +159,11 @@
       if (ip_route_input(skb, iph->daddr, iph->saddr, iph->tos,
           dev)) {
          struct rtable *rt;
+         struct flowi fl = { .nl_u = 
+         { .ip4_u = { .daddr = iph->daddr, .saddr = 0 ,
+                 .tos = iph->tos} }, .proto = 0};
 
-         if (!ip_route_output(&rt, iph->daddr, 0, iph->tos, 0)) {
+         if (!ip_route_output_key(&rt, &fl)) {
             /* Bridged-and-DNAT'ed traffic doesn't
              * require ip_forwarding.
              */


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.