kernel: fix ip6_tunnel compilation
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Sun, 24 Apr 2016 10:56:07 +0000 (12:56 +0200)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Sun, 24 Apr 2016 10:56:07 +0000 (12:56 +0200)
Replace undefined iph for ip_hdr(skb)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch

index 0d4409ebda122ad486532dc364235dd9be697365..657804a27718f04da388f0a13745013f76f8f1fc 100644 (file)
@@ -311,13 +311,13 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
 +      for (fmr = t->parms.fmrs; fmr; fmr = fmr->next) {
 +              unsigned mshift = 32 - fmr->ip4_prefix_len;
 +              if (ntohl(fmr->ip4_prefix.s_addr) >> mshift ==
-+                              ntohl(iph->daddr) >> mshift)
++                              ntohl(ip_hdr(skb)->daddr) >> mshift)
 +                      break;
 +      }
 +
 +      /* change dstaddr according to FMR */
 +      if (fmr)
-+              ip4ip6_fmr_calc(&fl6.daddr, iph, skb_tail_pointer(skb), fmr, true);
++              ip4ip6_fmr_calc(&fl6.daddr, ip_hdr(skb), skb_tail_pointer(skb), fmr, true);
 +
        err = ip6_tnl_xmit2(skb, dev, dsfield, &fl6, encap_limit, &mtu);
        if (err != 0) {