ia64/xen-unstable

changeset 11675:6d5d5b883dfc

[NET] back: Reset netfilter context in loopback receive path.
The issue is described in bugzilla report #746.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Sep 29 09:29:20 2006 +0100 (2006-09-29)
parents 52bb01f36c8b
children 412fc1c1bd7a
files linux-2.6-xen-sparse/drivers/xen/netback/loopback.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c	Fri Sep 29 09:23:18 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c	Fri Sep 29 09:29:20 2006 +0100
     1.3 @@ -53,7 +53,8 @@
     1.4  #include <linux/skbuff.h>
     1.5  #include <linux/ethtool.h>
     1.6  #include <net/dst.h>
     1.7 -#include <asm/hypervisor.h> /* is_initial_xendomain() */
     1.8 +#include <net/xfrm.h>		/* secpath_reset() */
     1.9 +#include <asm/hypervisor.h>	/* is_initial_xendomain() */
    1.10  
    1.11  static int nloopbacks = -1;
    1.12  module_param(nloopbacks, int, 0);
    1.13 @@ -111,6 +112,11 @@ static int loopback_start_xmit(struct sk
    1.14  	skb->protocol = eth_type_trans(skb, dev);
    1.15  	skb->dev      = dev;
    1.16  	dev->last_rx  = jiffies;
    1.17 +
    1.18 +	/* Flush netfilter context: rx'ed skbuffs not expected to have any. */
    1.19 +	nf_reset(skb);
    1.20 +	secpath_reset(skb);
    1.21 +
    1.22  	netif_rx(skb);
    1.23  
    1.24  	return 0;