kernel: fix ip6_tunnel compilation
Replace undefined iph for ip_hdr(skb) Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
3faf65e928
commit
a90ee92337
1 changed files with 2 additions and 2 deletions
|
@ -311,13 +311,13 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||||
+ for (fmr = t->parms.fmrs; fmr; fmr = fmr->next) {
|
+ for (fmr = t->parms.fmrs; fmr; fmr = fmr->next) {
|
||||||
+ unsigned mshift = 32 - fmr->ip4_prefix_len;
|
+ unsigned mshift = 32 - fmr->ip4_prefix_len;
|
||||||
+ if (ntohl(fmr->ip4_prefix.s_addr) >> mshift ==
|
+ if (ntohl(fmr->ip4_prefix.s_addr) >> mshift ==
|
||||||
+ ntohl(iph->daddr) >> mshift)
|
+ ntohl(ip_hdr(skb)->daddr) >> mshift)
|
||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /* change dstaddr according to FMR */
|
+ /* change dstaddr according to FMR */
|
||||||
+ if (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);
|
err = ip6_tnl_xmit2(skb, dev, dsfield, &fl6, encap_limit, &mtu);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
|
|
Loading…
Reference in a new issue