xfrm: merge dstopt and routing hdroff functions
authorFlorian Westphal <fw@strlen.de>
Fri, 11 Jun 2021 10:50:14 +0000 (12:50 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 11 Jun 2021 12:48:51 +0000 (14:48 +0200)
commit3ca5ca83e206eab566830e08664eda415f428374
tree988c9ee273eb4c18c9f6ebda2f434e12a1cc111b
parentd1002d2490e3ebc30dd3ba747656cfa90c87e984
xfrm: merge dstopt and routing hdroff functions

Both functions are very similar, so merge them into one.

The nexthdr is passed as argument to break the loop in the
ROUTING case, this is the only header type where slightly different
rules apply.

While at it, the merged function is realigned with
ip6_find_1stfragopt().  That function received bug fixes for an infinite
loop, but neither dstopt nor rh parsing functions (copy-pasted from
ip6_find_1stfragopt) were changed.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_output.c