X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=net%2Fipv6%2Fexthdrs_core.c;h=8af3eb57f4380fd7de7497ff98f40c88f2040e50;hb=084c6c5013af3c62f1c344435214496f5ac999f2;hp=140748debc4ade194e5e179636e94264da7e65a1;hpb=19bf1c2c7b9f21b9fe86315c5758d26c3049c2ad;p=~andy%2Flinux diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c index 140748debc4..8af3eb57f43 100644 --- a/net/ipv6/exthdrs_core.c +++ b/net/ipv6/exthdrs_core.c @@ -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; }