Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix AF_XDP cq entry leak, from Ilya Maximets. 2) Fix handling of PHY power-down on RTL8411B, from Heiner Kallweit. 3) Add some new PCI IDs to iwlwifi, from Ihab Zhaika. 4) Fix handling of neigh timers wrt. entries added by userspace, from Lorenzo Bianconi. 5) Various cases of missing of_node_put(), from Nishka Dasgupta. 6) The new NET_ACT_CT needs to depend upon NF_NAT, from Yue Haibing. 7) Various RDS layer fixes, from Gerd Rausch. 8) Fix some more fallout from TCQ_F_CAN_BYPASS generalization, from Cong Wang. 9) Fix FIB source validation checks over loopback, also from Cong Wang. 10) Use promisc for unsupported number of filters, from Justin Chen. 11) Missing sibling route unlink on failure in ipv6, from Ido Schimmel. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (90 commits) tcp: fix tcp_set_congestion_control() use from bpf hook ag71xx: fix return value check in ag71xx_probe() ag71xx: fix error return code in ag71xx_probe() usb: qmi_wwan: add D-Link DWM-222 A2 device ID bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips. net: dsa: sja1105: Fix missing unlock on error in sk_buff() gve: replace kfree with kvfree selftests/bpf: fix test_xdp_noinline on s390 selftests/bpf: fix "valid read map access into a read-only array 1" on s390 net/mlx5: Replace kfree with kvfree MAINTAINERS: update netsec driver ipv6: Unlink sibling route in case of failure liquidio: Replace vmalloc + memset with vzalloc udp: Fix typo in net/ipv4/udp.c net: bcmgenet: use promisc for unsupported filters ipv6: rt6_check should return NULL if 'from' is NULL tipc: initialize 'validated' field of received packets selftests: add a test case for rp_filter fib: relax source validation check for loopback packets mlxsw: spectrum: Do not process learned records with a dummy FID ...
This commit is contained in:
@@ -388,6 +388,11 @@ static int __fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst,
|
||||
fib_combine_itag(itag, &res);
|
||||
|
||||
dev_match = fib_info_nh_uses_dev(res.fi, dev);
|
||||
/* This is not common, loopback packets retain skb_dst so normally they
|
||||
* would not even hit this slow path.
|
||||
*/
|
||||
dev_match = dev_match || (res.type == RTN_LOCAL &&
|
||||
dev == net->loopback_dev);
|
||||
if (dev_match) {
|
||||
ret = FIB_RES_NHC(res)->nhc_scope >= RT_SCOPE_HOST;
|
||||
return ret;
|
||||
|
@@ -2785,7 +2785,9 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
|
||||
name[val] = 0;
|
||||
|
||||
lock_sock(sk);
|
||||
err = tcp_set_congestion_control(sk, name, true, true);
|
||||
err = tcp_set_congestion_control(sk, name, true, true,
|
||||
ns_capable(sock_net(sk)->user_ns,
|
||||
CAP_NET_ADMIN));
|
||||
release_sock(sk);
|
||||
return err;
|
||||
}
|
||||
|
@@ -333,7 +333,8 @@ out:
|
||||
* tcp_reinit_congestion_control (if the current congestion control was
|
||||
* already initialized.
|
||||
*/
|
||||
int tcp_set_congestion_control(struct sock *sk, const char *name, bool load, bool reinit)
|
||||
int tcp_set_congestion_control(struct sock *sk, const char *name, bool load,
|
||||
bool reinit, bool cap_net_admin)
|
||||
{
|
||||
struct inet_connection_sock *icsk = inet_csk(sk);
|
||||
const struct tcp_congestion_ops *ca;
|
||||
@@ -369,8 +370,7 @@ int tcp_set_congestion_control(struct sock *sk, const char *name, bool load, boo
|
||||
} else {
|
||||
err = -EBUSY;
|
||||
}
|
||||
} else if (!((ca->flags & TCP_CONG_NON_RESTRICTED) ||
|
||||
ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))) {
|
||||
} else if (!((ca->flags & TCP_CONG_NON_RESTRICTED) || cap_net_admin)) {
|
||||
err = -EPERM;
|
||||
} else if (!try_module_get(ca->owner)) {
|
||||
err = -EBUSY;
|
||||
|
@@ -2170,7 +2170,7 @@ start_lookup:
|
||||
|
||||
/* Initialize UDP checksum. If exited with zero value (success),
|
||||
* CHECKSUM_UNNECESSARY means, that no more checks are required.
|
||||
* Otherwise, csum completion requires chacksumming packet body,
|
||||
* Otherwise, csum completion requires checksumming packet body,
|
||||
* including udp header and folding it to skb->csum.
|
||||
*/
|
||||
static inline int udp4_csum_init(struct sk_buff *skb, struct udphdr *uh,
|
||||
|
Reference in New Issue
Block a user