WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] Backport netfilter bug fix from 2.6.1

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Backport netfilter bug fix from 2.6.19.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Oct 2007 14:50:22 -0700
Delivery-date: Mon, 22 Oct 2007 14:50:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1193059747 -3600
# Node ID 709db80c03c3d7606744a71f48f5186358a5e659
# Parent  ba49878d835958bd464a5853b4a8bddaf10101fb
Backport netfilter bug fix from 2.6.19.
Signed-off-by: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
---
 include/linux/netfilter_bridge.h |   14 +++++++++-----
 net/bridge/br_netfilter.c        |    4 ++--
 2 files changed, 11 insertions(+), 7 deletions(-)

diff -r ba49878d8359 -r 709db80c03c3 include/linux/netfilter_bridge.h
--- a/include/linux/netfilter_bridge.h  Fri Oct 19 18:08:30 2007 +0100
+++ b/include/linux/netfilter_bridge.h  Mon Oct 22 14:29:07 2007 +0100
@@ -7,6 +7,7 @@
 #include <linux/netfilter.h>
 #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER)
 #include <linux/if_ether.h>
+#include <linux/if_vlan.h>
 #endif
 
 /* Bridge Hooks */
@@ -54,16 +55,19 @@ int nf_bridge_maybe_copy_header(struct s
 
        if (skb->nf_bridge) {
                if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
-                       err = skb_cow(skb, 18);
+                       int header_size = ETH_HLEN + VLAN_HLEN;
+
+                       err = skb_cow(skb, header_size);
                        if (err)
                                return err;
-                       memcpy(skb->data - 18, skb->nf_bridge->data, 18);
-                       skb_push(skb, 4);
+                       memcpy(skb->data - header_size, skb->nf_bridge->data,
+                              header_size);
+                       skb_push(skb, VLAN_HLEN);
                } else {
-                       err = skb_cow(skb, 16);
+                       err = skb_cow(skb, ETH_HLEN);
                        if (err)
                                return err;
-                       memcpy(skb->data - 16, skb->nf_bridge->data, 16);
+                       memcpy(skb->data - ETH_HLEN, skb->nf_bridge->data, 
ETH_HLEN);
                }
        }
        return 0;
diff -r ba49878d8359 -r 709db80c03c3 net/bridge/br_netfilter.c
--- a/net/bridge/br_netfilter.c Fri Oct 19 18:08:30 2007 +0100
+++ b/net/bridge/br_netfilter.c Mon Oct 22 14:29:07 2007 +0100
@@ -127,10 +127,10 @@ static inline struct nf_bridge_info *nf_
 
 static inline void nf_bridge_save_header(struct sk_buff *skb)
 {
-        int header_size = 16;
+        int header_size = ETH_HLEN;
 
        if (skb->protocol == htons(ETH_P_8021Q))
-               header_size = 18;
+               header_size += VLAN_HLEN;
 
        memcpy(skb->nf_bridge->data, skb->data - header_size, header_size);
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Backport netfilter bug fix from 2.6.19., Xen patchbot-linux-2.6.18-xen <=