--- zzzz-none-000/linux-4.1.38/net/ipv6/ipv6_sockglue.c 2017-01-18 18:48:06.000000000 +0000 +++ bcm63-7582-715/linux-4.1.38/net/ipv6/ipv6_sockglue.c 2020-11-25 10:06:48.000000000 +0000 @@ -48,6 +48,10 @@ #include #include #include +#if defined(CONFIG_BCM_MPTCP) && defined(CONFIG_BCM_KF_MPTCP) +#include +#include +#endif #include #include #include @@ -215,7 +219,16 @@ sock_prot_inuse_add(net, &tcp_prot, 1); local_bh_enable(); sk->sk_prot = &tcp_prot; +#if !defined(CONFIG_BCM_MPTCP) || !defined(CONFIG_BCM_KF_MPTCP) icsk->icsk_af_ops = &ipv4_specific; +#else +#ifdef CONFIG_MPTCP + if (sock_flag(sk, SOCK_MPTCP)) + icsk->icsk_af_ops = &mptcp_v4_specific; + else +#endif + icsk->icsk_af_ops = &ipv4_specific; +#endif sk->sk_socket->ops = &inet_stream_ops; sk->sk_family = PF_INET; tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); @@ -241,7 +254,16 @@ pktopt = xchg(&np->pktoptions, NULL); kfree_skb(pktopt); +#if !defined(CONFIG_BCM_MPTCP) || !defined(CONFIG_BCM_KF_MPTCP) sk->sk_destruct = inet_sock_destruct; +#else +#ifdef CONFIG_MPTCP + if (is_meta_sk(sk)) + sk->sk_destruct = mptcp_sock_destruct; + else +#endif + sk->sk_destruct = inet_sock_destruct; +#endif /* * ... and add it to the refcnt debug socks count * in the new family. -acme