]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: routing header fixes
authorBrian Haley <brian.haley@hp.com>
Thu, 13 Nov 2008 06:59:21 +0000 (22:59 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Nov 2008 06:59:21 +0000 (22:59 -0800)
commit78641617bbff93de2693adc521270f29c17a364f
treeb9250d24821ffa8edb55fee50e0d695afd23a6f9
parent27d56650c22b899270ebfc2d5c1223f4f68dcb95
ipv6: routing header fixes

This patch fixes two bugs:

1. setsockopt() of anything but a Type 2 routing header should return
EINVAL instead of EPERM.  Noticed by Shan Wei
(shanwei@cn.fujitsu.com).

2. setsockopt()/sendmsg() of a Type 2 routing header with invalid
length or segments should return EINVAL.  These values are statically
fixed in RFC 3775, unlike the variable Type 0 was.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/datagram.c
net/ipv6/ipv6_sockglue.c