Hello.
Following changesets fixes checksum for rawv6 sockets.
- don't receive packets with incorrect checksum
Please pull following csets from <bk://bk.skbuff.net:20426>.
Thanks in advance.
CHANGESET
---------
ChangeSet@xxxxxx, 2004-05-20 19:07:49+09:00, yoshfuji@xxxxxxxxxxxxxx
[IPV6] ensure to evaluate the checksum for sockets with the IPV6_CHECKSUM
option.
diff -Nru a/net/ipv6/raw.c b/net/ipv6/raw.c
--- a/net/ipv6/raw.c Thu May 20 19:08:48 2004
+++ b/net/ipv6/raw.c Thu May 20 19:08:48 2004
@@ -279,8 +279,11 @@
static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
{
+ if ((sk->tp_pinfo.tp_raw.checksum
#if defined(CONFIG_FILTER)
- if (sk->filter && skb->ip_summed != CHECKSUM_UNNECESSARY) {
+ || sk->filter
+#endif
+ ) && skb->ip_summed != CHECKSUM_UNNECESSARY) {
if ((unsigned short)csum_fold(skb_checksum(skb, 0, skb->len,
skb->csum))) {
IP6_INC_STATS_BH(Ip6InDiscards);
kfree_skb(skb);
@@ -288,7 +291,6 @@
}
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
-#endif
/* Charge it to the socket. */
if (sock_queue_rcv_skb(sk,skb)<0) {
IP6_INC_STATS_BH(Ip6InDiscards);
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
|