Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix null deref in xt_TEE netfilter module, from Eric Dumazet. 2) Several spots need to get to the original listner for SYN-ACK packets, most spots got this ok but some were not. Whilst covering the remaining cases, create a helper to do this. From Eric Dumazet. 3) Missiing check of return value from alloc_netdev() in CAIF SPI code, from Rasmus Villemoes. 4) Don't sleep while != TASK_RUNNING in macvtap, from Vlad Yasevich. 5) Use after free in mvneta driver, from Justin Maggard. 6) Fix race on dst->flags access in dst_release(), from Eric Dumazet. 7) Add missing ZLIB_INFLATE dependency for new qed driver. From Arnd Bergmann. 8) Fix multicast getsockopt deadlock, from WANG Cong. 9) Fix deadlock in btusb, from Kuba Pawlak. 10) Some ipv6_add_dev() failure paths were not cleaning up the SNMP6 counter state. From Sabrina Dubroca. 11) Fix packet_bind() race, which can cause lost notifications, from Francesco Ruggeri. 12) Fix MAC restoration in qlcnic driver during bonding mode changes, from Jarod Wilson. 13) Revert bridging forward delay change which broke libvirt and other userspace things, from Vlad Yasevich. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (65 commits) Revert "bridge: Allow forward delay to be cfgd when STP enabled" bpf_trace: Make dependent on PERF_EVENTS qed: select ZLIB_INFLATE net: fix a race in dst_release() net: mvneta: Fix memory use after free. net: Documentation: Fix default value tcp_limit_output_bytes macvtap: Resolve possible __might_sleep warning in macvtap_do_read() mvneta: add FIXED_PHY dependency net: caif: check return value of alloc_netdev net: hisilicon: NET_VENDOR_HISILICON should depend on HAS_DMA drivers: net: xgene: fix RGMII 10/100Mb mode netfilter: nft_meta: use skb_to_full_sk() helper net_sched: em_meta: use skb_to_full_sk() helper sched: cls_flow: use skb_to_full_sk() helper netfilter: xt_owner: use skb_to_full_sk() helper smack: use skb_to_full_sk() helper net: add skb_to_full_sk() helper and use it in selinux_netlbl_skbuff_setsid() bpf: doc: correct arch list for supported eBPF JIT dwc_eth_qos: Delete an unnecessary check before the function call "of_node_put" bonding: fix panic on non-ARPHRD_ETHER enslave failure ...
This commit is contained in:
@@ -275,6 +275,8 @@ struct l2cap_conn_rsp {
|
||||
#define L2CAP_CR_AUTHORIZATION 0x0006
|
||||
#define L2CAP_CR_BAD_KEY_SIZE 0x0007
|
||||
#define L2CAP_CR_ENCRYPTION 0x0008
|
||||
#define L2CAP_CR_INVALID_SCID 0x0009
|
||||
#define L2CAP_CR_SCID_IN_USE 0x0010
|
||||
|
||||
/* connect/create channel status */
|
||||
#define L2CAP_CS_NO_INFO 0x0000
|
||||
|
@@ -63,12 +63,13 @@ static inline struct metadata_dst *tun_rx_dst(int md_size)
|
||||
static inline struct metadata_dst *tun_dst_unclone(struct sk_buff *skb)
|
||||
{
|
||||
struct metadata_dst *md_dst = skb_metadata_dst(skb);
|
||||
int md_size = md_dst->u.tun_info.options_len;
|
||||
int md_size;
|
||||
struct metadata_dst *new_md;
|
||||
|
||||
if (!md_dst)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
md_size = md_dst->u.tun_info.options_len;
|
||||
new_md = metadata_dst_alloc(md_size, GFP_ATOMIC);
|
||||
if (!new_md)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@@ -210,6 +210,18 @@ struct inet_sock {
|
||||
#define IP_CMSG_ORIGDSTADDR BIT(6)
|
||||
#define IP_CMSG_CHECKSUM BIT(7)
|
||||
|
||||
/* SYNACK messages might be attached to request sockets.
|
||||
* Some places want to reach the listener in this case.
|
||||
*/
|
||||
static inline struct sock *skb_to_full_sk(const struct sk_buff *skb)
|
||||
{
|
||||
struct sock *sk = skb->sk;
|
||||
|
||||
if (sk && sk->sk_state == TCP_NEW_SYN_RECV)
|
||||
sk = inet_reqsk(sk)->rsk_listener;
|
||||
return sk;
|
||||
}
|
||||
|
||||
static inline struct inet_sock *inet_sk(const struct sock *sk)
|
||||
{
|
||||
return (struct inet_sock *)sk;
|
||||
|
Reference in New Issue
Block a user