Skip to contentSkip to conversation

xfrm: fix error checking in xfrm_output_gso

PATCH In review Yan, Zheng 1 participant 2 messages Oct 27, 2011 – Oct 28, 2011

Subsystems (3)
lore
Share & tools
lore

Yan, Zheng

author
#0 lore raw

PATCH 1/1 xfrm: fix error checking in xfrm_output_gso

xfrm_output2() returns 1 on success. This bug makes xfrm_output_gso() drop all segments except the first one.

---

net/xfrm/xfrm_output.c +1 -1
index 47bacd8..04e963a 100644
@@ -159,7 +159,7 @@ static int xfrm_output_gso(struct sk_buff *skb)
 		segs->next = NULL;
 		err = xfrm_output2(segs);
 
-		if (unlikely(err)) {
+		if (unlikely(err < 0)) {
 			while ((segs = nskb)) {
 				nskb = segs->next;
 				segs->next = NULL;
author
#1 lore raw
Quoted 10 lines · Zheng

xfrm_output2() returns 1 on success. This bug makes xfrm_output_gso() drop all segments except the first one.

---

net/xfrm/xfrm_output.c +0 -0
index 47bacd8..04e963a 100644

net/xfrm/xfrm_output.c static int xfrm_output_gso(struct sk_buff *skb) · line 165

Quoted 8 lines
net/xfrm/xfrm_output.c +1 -1
@@ -159,7 +159,7 @@ static int xfrm_output_gso(struct sk_buff *skb)
 		segs->next = NULL;
 		err = xfrm_output2(segs);
 
-		if (unlikely(err)) {
+		if (unlikely(err < 0)) {
 			while ((segs = nskb)) {
 				nskb = segs->next;
 				segs->next = NULL;

Return 1 means collision, please ignore this patch. Thanks