Skip to contentSkip to conversation

Clean up netfilter cache on xmit-to-self.

PATCH In review Ben Greear 2 participants 5 messages Jul 22, 2010

Subsystems (2)
lore
Share & tools
lore

Ben Greear

author
#0 lore raw

cover Clean up netfilter cache on xmit-to-self.

These patches are against 2.6.34.1. The first one may be worth submitting to stable. The second one is less critical and should probably just go in the development tree.

author
#1 lore raw

PATCH 1/2 net: dev_forward_skb should call nf_reset

With conn-track zones and probably with different network namespaces, the netfilter logic needs to be re-calculated on packet receive. If the netfilter logic is not reset, it will not be recalculated properly. This patch adds the nf_reset logic to dev_forward_skb.

---
:100644 100644 7ac33e5... 22eee4e... M net/core/dev.c

 net/core/dev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
net/core/dev.c +1 -0
index 7ac33e5..22eee4e 100644
@@ -1482,6 +1482,7 @@ static inline void net_timestamp(struct sk_buff *skb)
 int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
 {
 	skb_orphan(skb);
+	nf_reset(skb);
 
 	if (!(dev->flags & IFF_UP) ||
 	    (skb->len > (dev->mtu + dev->hard_header_len))) {
Signature · 1 line
1.6.2.5
author
#2 lore raw

PATCH 2/2 veth: Remove redundant timestamp assignment.

In reply to Ben Greear

The timestamp is already cleared in the dev_forward_skb logic.

---
:100644 100644 0cfbb3d... 161ee02... M drivers/net/veth.c

 drivers/net/veth.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
drivers/net/veth.c +0 -5
index 0cfbb3d..161ee02 100644
@@ -181,11 +181,6 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (dev->features & NETIF_F_NO_CSUM)
 		skb->ip_summed = rcv_priv->ip_summed;
 
-	/* Zero out the time-stamp so that receiving code is forced
-	 * to recalculate it.
-	 */
-	skb->tstamp.tv64 = 0;
-
 	length = skb->len + ETH_HLEN;
 	if (dev_forward_skb(rcv, skb) != NET_RX_SUCCESS)
 		goto rx_drop;
Signature · 1 line
1.6.2.5
maintainer
#3 lore raw
In reply to Ben Greear

Ben please submit networking patches with netdev on the CC: list.

You've been doing networking hacking for a very long time, so I'm very surprised you failed to do this :-)

author
#4 lore raw
Quoted 5 lines · David Miller

Ben please submit networking patches with netdev on the CC: list.

You've been doing networking hacking for a very long time, so I'm very surprised you failed to do this :-)

I've been using git-email for not so long..forgot to over-ride the email addr. Will resend to netdev.

Thanks,
Ben

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com