Skip to contentSkip to conversation

: ipt action: add back pskb_expand_head call

PATCH Applied Patrick McHardy 2 participants 3 messages Feb 4, 2005 – Feb 7, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : ipt action: add back pskb_expand_head call

Hi Dave,

Jamal asked me to add back the call to pskb_expand_head before 2.6.11. This fixes a regression caused by my tc action cleanup patches, the tc actions most not replace packets, so it must prevent netfilter from doing so.

Regards
Patrick

===== net/sched/ipt.c 1.13 vs edited =====

net/sched/ipt.c +5 -0
@@ -207,6 +207,11 @@
 	struct tcf_ipt *p = PRIV(a, ipt);
 	struct sk_buff *skb = *pskb;
 
+	if (skb_cloned(skb)) {
+		if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
+			return TC_ACT_UNSPEC;
+	}
+
 	spin_lock(&p->lock);
 
 	p->tm.lastuse = jiffies;
#1 lore raw
Quoted 6 lines · Patrick McHardy

Hi Dave,

Jamal asked me to add back the call to pskb_expand_head before 2.6.11. This fixes a regression caused by my tc action cleanup patches, the tc actions most not replace packets, so it must prevent netfilter from doing so.

I forgot the Signed-off-by line, sorry:

Quoted 19 lines

------------------------------------------------------------------------

===== net/sched/ipt.c 1.13 vs edited =====

net/sched/ipt.c +5 -0
@@ -207,6 +207,11 @@
 	struct tcf_ipt *p = PRIV(a, ipt);
 	struct sk_buff *skb = *pskb;
 
+	if (skb_cloned(skb)) {
+		if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
+			return TC_ACT_UNSPEC;
+	}
+
 	spin_lock(&p->lock);
 
 	p->tm.lastuse = jiffies;
maintainer Applied
#2 lore raw
In reply to Patrick McHardy
Quoted 4 lines · On Fri, 04 Feb 2005 04:10:54 +0100 Patrick McHardy <[email protected]> wrote:

Jamal asked me to add back the call to pskb_expand_head before 2.6.11. This fixes a regression caused by my tc action cleanup patches, the tc actions most not replace packets, so it must prevent netfilter from doing so.

Applied, thanks Patrick.