net: l3mdev: remove redundant calls
A previous patch added l3mdev flow update making these hooks redundant. Remove them. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Tento commit je obsažen v:
@@ -1070,8 +1070,6 @@ struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6,
|
||||
return ERR_PTR(err);
|
||||
if (final_dst)
|
||||
fl6->daddr = *final_dst;
|
||||
if (!fl6->flowi6_oif)
|
||||
fl6->flowi6_oif = l3mdev_fib_oif(dst->dev);
|
||||
|
||||
return xfrm_lookup_route(sock_net(sk), dst, flowi6_to_flowi(fl6), sk, 0);
|
||||
}
|
||||
|
@@ -67,7 +67,6 @@
|
||||
#include <net/flow.h>
|
||||
#include <net/ip6_checksum.h>
|
||||
#include <net/inet_common.h>
|
||||
#include <net/l3mdev.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
#include <linux/netfilter.h>
|
||||
@@ -457,11 +456,9 @@ static void ndisc_send_skb(struct sk_buff *skb,
|
||||
|
||||
if (!dst) {
|
||||
struct flowi6 fl6;
|
||||
int oif = l3mdev_fib_oif(skb->dev);
|
||||
int oif = skb->dev->ifindex;
|
||||
|
||||
icmpv6_flow_init(sk, &fl6, type, saddr, daddr, oif);
|
||||
if (oif != skb->dev->ifindex)
|
||||
fl6.flowi6_flags |= FLOWI_FLAG_L3MDEV_SRC;
|
||||
dst = icmp6_dst_alloc(skb->dev, &fl6);
|
||||
if (IS_ERR(dst)) {
|
||||
kfree_skb(skb);
|
||||
@@ -1538,7 +1535,6 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
|
||||
int rd_len;
|
||||
u8 ha_buf[MAX_ADDR_LEN], *ha = NULL,
|
||||
ops_data_buf[NDISC_OPS_REDIRECT_DATA_SPACE], *ops_data = NULL;
|
||||
int oif = l3mdev_fib_oif(dev);
|
||||
bool ret;
|
||||
|
||||
if (ipv6_get_lladdr(dev, &saddr_buf, IFA_F_TENTATIVE)) {
|
||||
@@ -1555,10 +1551,7 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
|
||||
}
|
||||
|
||||
icmpv6_flow_init(sk, &fl6, NDISC_REDIRECT,
|
||||
&saddr_buf, &ipv6_hdr(skb)->saddr, oif);
|
||||
|
||||
if (oif != skb->dev->ifindex)
|
||||
fl6.flowi6_flags |= FLOWI_FLAG_L3MDEV_SRC;
|
||||
&saddr_buf, &ipv6_hdr(skb)->saddr, dev->ifindex);
|
||||
|
||||
dst = ip6_route_output(net, NULL, &fl6);
|
||||
if (dst->error) {
|
||||
|
@@ -1164,7 +1164,7 @@ void ip6_route_input(struct sk_buff *skb)
|
||||
int flags = RT6_LOOKUP_F_HAS_SADDR;
|
||||
struct ip_tunnel_info *tun_info;
|
||||
struct flowi6 fl6 = {
|
||||
.flowi6_iif = l3mdev_fib_oif(skb->dev),
|
||||
.flowi6_iif = skb->dev->ifindex,
|
||||
.daddr = iph->daddr,
|
||||
.saddr = iph->saddr,
|
||||
.flowlabel = ip6_flowinfo(iph),
|
||||
@@ -3349,11 +3349,6 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
|
||||
} else {
|
||||
fl6.flowi6_oif = oif;
|
||||
|
||||
if (netif_index_is_l3_master(net, oif)) {
|
||||
fl6.flowi6_flags = FLOWI_FLAG_L3MDEV_SRC |
|
||||
FLOWI_FLAG_SKIP_NH_OIF;
|
||||
}
|
||||
|
||||
rt = (struct rt6_info *)ip6_route_output(net, NULL, &fl6);
|
||||
}
|
||||
|
||||
|
@@ -818,12 +818,8 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
|
||||
fl6.flowi6_proto = IPPROTO_TCP;
|
||||
if (rt6_need_strict(&fl6.daddr) && !oif)
|
||||
fl6.flowi6_oif = tcp_v6_iif(skb);
|
||||
else {
|
||||
if (!oif && netif_index_is_l3_master(net, skb->skb_iif))
|
||||
oif = skb->skb_iif;
|
||||
|
||||
fl6.flowi6_oif = oif;
|
||||
}
|
||||
else
|
||||
fl6.flowi6_oif = oif ? : skb->skb_iif;
|
||||
|
||||
fl6.flowi6_mark = IP6_REPLY_MARK(net, skb->mark);
|
||||
fl6.fl6_dport = t1->dest;
|
||||
|
@@ -134,7 +134,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
|
||||
nexthdr = nh[nhoff];
|
||||
|
||||
if (skb_dst(skb))
|
||||
oif = l3mdev_fib_oif(skb_dst(skb)->dev);
|
||||
oif = skb_dst(skb)->dev->ifindex;
|
||||
|
||||
memset(fl6, 0, sizeof(struct flowi6));
|
||||
fl6->flowi6_mark = skb->mark;
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele