diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-25 15:28:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-25 15:28:28 -0400 |
commit | 2e561c7b7e705b619122e5386d6f99f28f2b6e5a (patch) | |
tree | be942c58cacd25c66cced37e1a82f269c37871de /net/ipv6 | |
parent | 2cfed60cc24676d65e01278dbf10d0069de02592 (diff) | |
parent | 653252c2302cdf2dfbca66a7e177f7db783f9efa (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (48 commits)
net: Fix wrong interpretation of some copy_to_user() results.
xfrm: alg_key_len & alg_icv_len should be unsigned
[netdrvr] tehuti: move ioctl perm check closer to function start
ipv6: Fix typo in net/ipv6/Kconfig
via-velocity: fix vlan receipt
tg3: sparse cleanup
forcedeth: realtek phy crossover detection
ibm_newemac: Increase MDIO timeouts
gianfar: Fix skb allocation strategy
netxen: reduce stack usage of netxen_nic_flash_print
smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}
net drivers: fix platform driver hotplug/coldplug
forcedeth: new backoff implementation
ehea: make things static
phylib: Add support for board-level PHY fixups
[netdrvr] atlx: code movement: move atl1 parameter parsing
atlx: remove flash vendor parameter
korina: misc cleanup
korina: fix misplaced return statement
WAN: Fix confusing insmod error code for C101 too.
...
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/Kconfig | 2 | ||||
-rw-r--r-- | net/ipv6/raw.c | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig index 42814a2ec9d7..b2c9becc02e8 100644 --- a/net/ipv6/Kconfig +++ b/net/ipv6/Kconfig | |||
@@ -167,7 +167,7 @@ config IPV6_SIT | |||
167 | Tunneling means encapsulating data of one protocol type within | 167 | Tunneling means encapsulating data of one protocol type within |
168 | another protocol and sending it over a channel that understands the | 168 | another protocol and sending it over a channel that understands the |
169 | encapsulating protocol. This driver implements encapsulation of IPv6 | 169 | encapsulating protocol. This driver implements encapsulation of IPv6 |
170 | into IPv4 packets. This is useful if you want to connect two IPv6 | 170 | into IPv4 packets. This is useful if you want to connect to IPv6 |
171 | networks over an IPv4-only path. | 171 | networks over an IPv4-only path. |
172 | 172 | ||
173 | Saying M here will produce a module called sit.ko. If unsure, say Y. | 173 | Saying M here will produce a module called sit.ko. If unsure, say Y. |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 6193b124cbc7..396f0ea11090 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -971,6 +971,19 @@ static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, | |||
971 | 971 | ||
972 | switch (optname) { | 972 | switch (optname) { |
973 | case IPV6_CHECKSUM: | 973 | case IPV6_CHECKSUM: |
974 | if (inet_sk(sk)->num == IPPROTO_ICMPV6 && | ||
975 | level == IPPROTO_IPV6) { | ||
976 | /* | ||
977 | * RFC3542 tells that IPV6_CHECKSUM socket | ||
978 | * option in the IPPROTO_IPV6 level is not | ||
979 | * allowed on ICMPv6 sockets. | ||
980 | * If you want to set it, use IPPROTO_RAW | ||
981 | * level IPV6_CHECKSUM socket option | ||
982 | * (Linux extension). | ||
983 | */ | ||
984 | return -EINVAL; | ||
985 | } | ||
986 | |||
974 | /* You may get strange result with a positive odd offset; | 987 | /* You may get strange result with a positive odd offset; |
975 | RFC2292bis agrees with me. */ | 988 | RFC2292bis agrees with me. */ |
976 | if (val > 0 && (val&1)) | 989 | if (val > 0 && (val&1)) |
@@ -1046,6 +1059,11 @@ static int do_rawv6_getsockopt(struct sock *sk, int level, int optname, | |||
1046 | 1059 | ||
1047 | switch (optname) { | 1060 | switch (optname) { |
1048 | case IPV6_CHECKSUM: | 1061 | case IPV6_CHECKSUM: |
1062 | /* | ||
1063 | * We allow getsockopt() for IPPROTO_IPV6-level | ||
1064 | * IPV6_CHECKSUM socket option on ICMPv6 sockets | ||
1065 | * since RFC3542 is silent about it. | ||
1066 | */ | ||
1049 | if (rp->checksum == 0) | 1067 | if (rp->checksum == 0) |
1050 | val = -1; | 1068 | val = -1; |
1051 | else | 1069 | else |