Skip to contentSkip to conversation

ipv6: ipv6_find_hdr restore prev functionality

PATCH In review Hans Schillstrom 2 participants 2 messages Feb 25, 2014

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

PATCH 1/1 ipv6: ipv6_find_hdr restore prev functionality

The commit 9195bb8e381d81d5a315f911904cdf0cfcc919b8 broke ipv6_find_hdr() for ipvs and possible also nft_exthdr_eval() This patch simple exit if specified header is found.

---
 net/ipv6/exthdrs_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/exthdrs_core.c +1 -1
index 140748d..8af3eb5 100644
@@ -212,7 +212,7 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
 		found = (nexthdr == target);
 
 		if ((!ipv6_ext_hdr(nexthdr)) || nexthdr == NEXTHDR_NONE) {
-			if (target < 0)
+			if (target < 0 || found)
 				break;
 			return -ENOENT;
 		}
Signature · 1 line
1.7.11.7
#1 lore raw

Hello.

Quoted 1 line · Hans Schillstrom

The commit 9195bb8e381d81d5a315f911904cdf0cfcc919b8

Please also specify that commit's summary line in parens.

Quoted 2 lines

broke ipv6_find_hdr() for ipvs and possible also nft_exthdr_eval() This patch simple exit if specified header is found.

s/exit/exits/.

Quoted 1 line

WBR, Sergei