kernel: fix rtcache compilation with 4.18+ with IPv6 support
[openwrt/openwrt.git] / target / linux / generic / backport-4.19 / 020-backport_netfilter_rtcache.patch
index 32b43082be937619a4af7b9c0f0283a7a44bdbf8..3a35381ce3008cc8c6362890b2c48a7276e0bd08 100644 (file)
@@ -209,8 +209,8 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
 +      if (pf == NFPROTO_IPV6) {
 +              const struct rt6_info *rt = (const struct rt6_info *)dst;
 +
-+              if (rt->rt6i_node)
-+                      return (u32)rt->rt6i_node->fn_sernum;
++              if (rt->from && rt->from->fib6_node)
++                      return (u32)rt->from->fib6_node->fn_sernum;
 +      }
 +#endif
 +      return 0;