Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Build issue in drivers/net/ethernet/sfc/ptp.c54fccfdd7c
("sfc: efx_default_channel_type APIs can be static")49e6123c65
("net: sfc: fix memory leak due to ptp channel") https://lore.kernel.org/all/20220510130556.52598fe2@canb.auug.org.au/ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@ -305,6 +305,7 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
|
||||
struct net *net = sock_net(sk);
|
||||
if (sk->sk_family == AF_INET) {
|
||||
struct sockaddr_in *addr = (struct sockaddr_in *) uaddr;
|
||||
u32 tb_id = RT_TABLE_LOCAL;
|
||||
int chk_addr_ret;
|
||||
|
||||
if (addr_len < sizeof(*addr))
|
||||
@ -318,7 +319,8 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
|
||||
pr_debug("ping_check_bind_addr(sk=%p,addr=%pI4,port=%d)\n",
|
||||
sk, &addr->sin_addr.s_addr, ntohs(addr->sin_port));
|
||||
|
||||
chk_addr_ret = inet_addr_type(net, addr->sin_addr.s_addr);
|
||||
tb_id = l3mdev_fib_table_by_index(net, sk->sk_bound_dev_if) ? : tb_id;
|
||||
chk_addr_ret = inet_addr_type_table(net, addr->sin_addr.s_addr, tb_id);
|
||||
|
||||
if (!inet_addr_valid_or_nonlocal(net, inet_sk(sk),
|
||||
addr->sin_addr.s_addr,
|
||||
@ -355,6 +357,14 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
||||
if (!dev && sk->sk_bound_dev_if) {
|
||||
dev = dev_get_by_index_rcu(net, sk->sk_bound_dev_if);
|
||||
if (!dev) {
|
||||
rcu_read_unlock();
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
has_addr = pingv6_ops.ipv6_chk_addr(net, &addr->sin6_addr, dev,
|
||||
scoped);
|
||||
rcu_read_unlock();
|
||||
|
@ -1754,6 +1754,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
||||
#endif
|
||||
RT_CACHE_STAT_INC(in_slow_mc);
|
||||
|
||||
skb_dst_drop(skb);
|
||||
skb_dst_set(skb, &rth->dst);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user