Re: [B.A.T.M.A.N.] [PATCH 1/2] bridge: multicast: call skb_checksum_{simple_, }validate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,
            I am getting following message if i post to b.a.t.m.a.n@lists.open-mesh.org. So I am mailing to this group.

Our wifi does not support adhoc mode. I am trying batman-adv setup on managed mode.

Can anybody tell me the settings fro batman-adv in managed mode/STA mode?

Regards,
Rudresh

On 10 April 2015 at 23:16, Linus Lüssing <linus.luessing@xxxxxxxxx> wrote:
Let's use these new, neat helpers.

Signed-off-by: Linus Lüssing <linus.luessing@xxxxxxxxx>
---
 net/bridge/br_multicast.c |   28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 4b6722f..b52f4cb 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1610,16 +1610,8 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br,
        if (!pskb_may_pull(skb2, sizeof(*ih)))
                goto out;

-       switch (skb2->ip_summed) {
-       case CHECKSUM_COMPLETE:
-               if (!csum_fold(skb2->csum))
-                       break;
-               /* fall through */
-       case CHECKSUM_NONE:
-               skb2->csum = 0;
-               if (skb_checksum_complete(skb2))
-                       goto out;
-       }
+       if (skb_checksum_simple_validate(skb2))
+               goto out;

        err = 0;

@@ -1737,20 +1729,8 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,

        ip6h = ipv6_hdr(skb2);

-       switch (skb2->ip_summed) {
-       case CHECKSUM_COMPLETE:
-               if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, skb2->len,
-                                       IPPROTO_ICMPV6, skb2->csum))
-                       break;
-               /*FALLTHROUGH*/
-       case CHECKSUM_NONE:
-               skb2->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr,
-                                                       &ip6h->daddr,
-                                                       skb2->len,
-                                                       IPPROTO_ICMPV6, 0));
-               if (__skb_checksum_complete(skb2))
-                       goto out;
-       }
+       if (skb_checksum_validate(skb2, IPPROTO_ICMPV6, ip6_compute_pseudo))
+               goto out;

        err = 0;

--
1.7.10.4



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux