Revert "netfilter: rpfilter/fib: Populate flowic_l3mdev field"
This reverts commit d98558fe26
which is
commit acc641ab95b66b813c1ce856c377a2bbe71e7f52 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Id5c8d6759b996ff84343f011ed32aec76d8b7260
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
6fc602a28c
commit
5cb5d15755
@ -78,7 +78,7 @@ static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
flow.flowi4_mark = info->flags & XT_RPFILTER_VALID_MARK ? skb->mark : 0;
|
||||
flow.flowi4_tos = iph->tos & IPTOS_RT_MASK;
|
||||
flow.flowi4_scope = RT_SCOPE_UNIVERSE;
|
||||
flow.flowi4_l3mdev = l3mdev_master_ifindex_rcu(xt_in(par));
|
||||
flow.flowi4_oif = l3mdev_master_ifindex_rcu(xt_in(par));
|
||||
|
||||
return rpfilter_lookup_reverse(xt_net(par), &flow, xt_in(par), info->flags) ^ invert;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ void nft_fib4_eval(const struct nft_expr *expr, struct nft_regs *regs,
|
||||
oif = NULL;
|
||||
|
||||
if (priv->flags & NFTA_FIB_F_IIF)
|
||||
fl4.flowi4_l3mdev = l3mdev_master_ifindex_rcu(oif);
|
||||
fl4.flowi4_oif = l3mdev_master_ifindex_rcu(oif);
|
||||
|
||||
if (nft_hook(pkt) == NF_INET_PRE_ROUTING &&
|
||||
nft_fib_is_loopback(pkt->skb, nft_in(pkt))) {
|
||||
|
@ -37,7 +37,6 @@ static bool rpfilter_lookup_reverse6(struct net *net, const struct sk_buff *skb,
|
||||
bool ret = false;
|
||||
struct flowi6 fl6 = {
|
||||
.flowi6_iif = LOOPBACK_IFINDEX,
|
||||
.flowi6_l3mdev = l3mdev_master_ifindex_rcu(dev),
|
||||
.flowlabel = (* (__be32 *) iph) & IPV6_FLOWINFO_MASK,
|
||||
.flowi6_proto = iph->nexthdr,
|
||||
.daddr = iph->saddr,
|
||||
@ -56,7 +55,9 @@ static bool rpfilter_lookup_reverse6(struct net *net, const struct sk_buff *skb,
|
||||
if (rpfilter_addr_linklocal(&iph->saddr)) {
|
||||
lookup_flags |= RT6_LOOKUP_F_IFACE;
|
||||
fl6.flowi6_oif = dev->ifindex;
|
||||
} else if ((flags & XT_RPFILTER_LOOSE) == 0)
|
||||
/* Set flowi6_oif for vrf devices to lookup route in l3mdev domain. */
|
||||
} else if (netif_is_l3_master(dev) || netif_is_l3_slave(dev) ||
|
||||
(flags & XT_RPFILTER_LOOSE) == 0)
|
||||
fl6.flowi6_oif = dev->ifindex;
|
||||
|
||||
rt = (void *)ip6_route_lookup(net, &fl6, skb, lookup_flags);
|
||||
|
@ -37,8 +37,9 @@ static int nft_fib6_flowi_init(struct flowi6 *fl6, const struct nft_fib *priv,
|
||||
if (ipv6_addr_type(&fl6->daddr) & IPV6_ADDR_LINKLOCAL) {
|
||||
lookup_flags |= RT6_LOOKUP_F_IFACE;
|
||||
fl6->flowi6_oif = get_ifindex(dev ? dev : pkt->skb->dev);
|
||||
} else if (priv->flags & NFTA_FIB_F_IIF) {
|
||||
fl6->flowi6_l3mdev = l3mdev_master_ifindex_rcu(dev);
|
||||
} else if ((priv->flags & NFTA_FIB_F_IIF) &&
|
||||
(netif_is_l3_master(dev) || netif_is_l3_slave(dev))) {
|
||||
fl6->flowi6_oif = dev->ifindex;
|
||||
}
|
||||
|
||||
if (ipv6_addr_type(&fl6->saddr) & IPV6_ADDR_UNICAST)
|
||||
|
Loading…
Reference in New Issue
Block a user