]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: fix source routing
authorSabrina Dubroca <sd@queasysnail.net>
Tue, 25 Apr 2017 13:56:50 +0000 (15:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Apr 2017 17:59:24 +0000 (13:59 -0400)
commit4ce0a9c97b67382d373b51feff3257771dbe815e
treed04bf4b4f4a7242797cce58619723eeacfac2a66
parent2c94eb10aee2916a0cf248ad1fdd48d79d567b2f
ipv6: fix source routing

Commit 4356d6f11458 ("ipv6: sr: add support for SRH injection through
setsockopt") introduced handling of IPV6_SRCRT_TYPE_4, but at the same
time restricted it to only IPV6_SRCRT_TYPE_0 and
IPV6_SRCRT_TYPE_4. Previously, ipv6_push_exthdr() and fl6_update_dst()
would also handle other values (ie STRICT and TYPE_2).

Restore previous source routing behavior, by handling IPV6_SRCRT_STRICT
and IPV6_SRCRT_TYPE_2 the same way as IPV6_SRCRT_TYPE_0 in
ipv6_push_exthdr() and fl6_update_dst().

Fixes: 4356d6f11458 ("ipv6: sr: add support for SRH injection through setsockopt")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/exthdrs.c