diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-04-24 12:56:07 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-04-24 12:56:07 +0200 |
commit | a90ee92337d60fd14b6431adcda9929b955f3408 (patch) | |
tree | b912dbb7c859445964596690544ea219603f0d86 /target/linux/generic | |
parent | 3faf65e92857aa5466791da3ec623c23af1f8130 (diff) | |
download | mtk-20170518-a90ee92337d60fd14b6431adcda9929b955f3408.zip mtk-20170518-a90ee92337d60fd14b6431adcda9929b955f3408.tar.gz mtk-20170518-a90ee92337d60fd14b6431adcda9929b955f3408.tar.bz2 |
kernel: fix ip6_tunnel compilation
Replace undefined iph for ip_hdr(skb)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/generic')
-rw-r--r-- | target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 0d4409e..657804a 100644 --- a/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/patches-4.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -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) { |