]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: ipv6_find_hdr restore prev functionality
authorHans Schillstrom <hans@schillstrom.com>
Thu, 27 Feb 2014 11:57:58 +0000 (12:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2014 23:27:26 +0000 (18:27 -0500)
commit8da3d98f84d52aa04b769b70fd9986969081c6b5
treedf6d84edf83f7c9e5f64a3d055ef22d1bab9a9a3
parent75442c3f8d1e7e1f4fcfe8d96e16d2830acafb6a
ipv6: ipv6_find_hdr restore prev functionality

The commit 81e30b8e71c357d16a373bc3f23e10ac87fe71db ("ipv6: improve
ipv6_find_hdr() to skip empty routing headers") broke ipv6_find_hdr().

When a target is specified like IPPROTO_ICMPV6 ipv6_find_hdr()
returns -ENOENT when it's found, not the header as expected.

A part of IPVS is broken and possible also nft_exthdr_eval().
When target is -1 which it is most cases, it works.

This patch exits the do while loop if the specific header is found
so the nexthdr could be returned as expected.

Reported-by: Art -kwaak- van Breemen <ard@telegraafnet.nl>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
CC:Ansis Atteka <aatteka@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/exthdrs_core.c