All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Kishen Maloor <kishen.maloor@intel.com>
Cc: Paolo Abeni <pabeni@redhat.com>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v2 07/21] mptcp: netlink: process IPv6 addrs in creating listening sockets
Date: Wed, 19 Jan 2022 11:14:24 -0800 (PST)	[thread overview]
Message-ID: <41b4eb-b482-cac0-558d-16a09a0f4f7@linux.intel.com> (raw)
In-Reply-To: <e5b4f614-4b6c-84d3-8558-bcd707bc32ac@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2803 bytes --]

On Tue, 18 Jan 2022, Kishen Maloor wrote:

> On 1/14/22 2:09 PM, Mat Martineau wrote:
>> On Fri, 14 Jan 2022, Paolo Abeni wrote:
>>
>>> Hello,
>>>
>>> On Wed, 2022-01-12 at 17:15 -0500, Kishen Maloor wrote:
>>>> This change updates mptcp_pm_nl_create_listen_socket() to create
>>>> listening sockets bound to IPv6 addresses (where IPv6 is supported).
>>>>
>>
>> This tag -
>>
>> Fixes: 1729cf186d8a ("mptcp: create the listening socket for new port")
>>
>> would help with backporting to stable.
>>
>>>> Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
>>>> ---
>>>>  net/mptcp/pm_netlink.c | 8 ++++++--
>>>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
>>>> index 4c1895dbc2a5..779ec9d375f0 100644
>>>> --- a/net/mptcp/pm_netlink.c
>>>> +++ b/net/mptcp/pm_netlink.c
>>>> @@ -986,6 +986,7 @@ static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
>>>>                          struct mptcp_pm_addr_entry *entry,
>>>>                          struct socket **lsk)
>>>>  {
>>>> +    int addrlen = sizeof(struct sockaddr_in);
>>>>      struct sockaddr_storage addr;
>>>>      struct mptcp_sock *msk;
>>>>      struct socket *ssock;
>>>> @@ -1010,8 +1011,11 @@ static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
>>>>      }
>>>>
>>>>      mptcp_info2sockaddr(&entry->addr, &addr, entry->addr.family);
>>>> -    err = kernel_bind(ssock, (struct sockaddr *)&addr,
>>>> -              sizeof(struct sockaddr_in));
>>>> +#if IS_ENABLED(CONFIG_MPTCP_IPV6)
>>>> +    if (entry->addr.family == AF_INET6)
>>>> +        addrlen = sizeof(struct sockaddr_in6);
>>>> +#endif
>>>> +    err = kernel_bind(ssock, (struct sockaddr *)&addr, addrlen);
>>>>      if (err) {
>>>>          pr_warn("kernel_bind error, err=%d", err);
>>>>          goto out;
>>>
>>> This looks a bugfix for -net to me?
>
> Sure, we can record a bug and the fact that this commit fixes it.
>
>>>
>>> Possibly worthy additional an additional mp_join self-test for the ipv6
>>> case.
>>>
>>
>> I agree, this would be good for -net. Kishen can you add the suggested selftest too and repost separately for mptcp-net?
>>
>
> Actually, this path is currently exercised by self-tests in userspace_pm.sh through address
> advertisements from the namespace containing the MPTCP client, for which a listening
> socket is created to subsequently receive MPJs.

Ok, it's good that it's covered going forward. Re-reading Paolo's comment, 
maybe that was the main purpose of the requested test (rather than adding 
to self test coverage in -stable). Should be enough to have the kernel fix 
itself for the -net patch.

--
Mat Martineau
Intel

  reply	other threads:[~2022-01-19 19:35 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 22:15 [PATCH mptcp-next v2 00/21] mptcp: support userspace path management Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 01/21] mptcp: do not restrict subflows with non-kernel PMs Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 02/21] mptcp: store remote id from MP_JOIN SYN/ACK in local ctx Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 03/21] mptcp: reflect remote port (not 0) in ANNOUNCED events Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 04/21] mptcp: establish subflows from either end of connection Kishen Maloor
2022-01-14 22:43   ` Mat Martineau
2022-01-17  8:59     ` Paolo Abeni
2022-01-19  1:26       ` Kishen Maloor
2022-01-19 12:01         ` Paolo Abeni
2022-01-19 17:59           ` Kishen Maloor
2022-01-19 18:59             ` Mat Martineau
2022-01-12 22:15 ` [PATCH mptcp-next v2 05/21] mptcp: netlink: store per namespace list of refcounted listen socks Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 06/21] mptcp: netlink: store lsk ref in mptcp_pm_addr_entry Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 07/21] mptcp: netlink: process IPv6 addrs in creating listening sockets Kishen Maloor
2022-01-14 15:27   ` Paolo Abeni
2022-01-14 22:09     ` Mat Martineau
2022-01-19  1:25       ` Kishen Maloor
2022-01-19 19:14         ` Mat Martineau [this message]
2022-01-12 22:15 ` [PATCH mptcp-next v2 08/21] mptcp: attempt to add listening sockets for announced addrs Kishen Maloor
2022-01-14 15:54   ` Paolo Abeni
2022-01-14 17:47     ` Matthieu Baerts
2022-01-14 22:26     ` Mat Martineau
2022-01-19  1:20     ` Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 09/21] mptcp: allow ADD_ADDR reissuance by userspace PMs Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 10/21] mptcp: handle local addrs announced " Kishen Maloor
2022-01-14 17:11   ` Paolo Abeni
2022-01-19  1:24     ` Kishen Maloor
2022-01-19 19:20       ` Mat Martineau
2022-01-19 20:27         ` Kishen Maloor
2022-01-19 20:44           ` Mat Martineau
2022-01-19 21:30             ` Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 11/21] mptcp: read attributes of addr entries managed " Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 12/21] mptcp: netlink: split mptcp_pm_parse_addr into two functions Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 13/21] mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE Kishen Maloor
2022-01-14 17:04   ` Paolo Abeni
2022-01-19  1:21     ` Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 14/21] mptcp: selftests: support MPTCP_PM_CMD_ANNOUNCE Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 15/21] mptcp: netlink: Add MPTCP_PM_CMD_REMOVE Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 16/21] mptcp: selftests: support MPTCP_PM_CMD_REMOVE Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 17/21] mptcp: netlink: allow userspace-driven subflow establishment Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 18/21] mptcp: selftests: support MPTCP_PM_CMD_SUBFLOW_CREATE Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 19/21] mptcp: selftests: support MPTCP_PM_CMD_SUBFLOW_DESTROY Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 20/21] mptcp: selftests: capture netlink events Kishen Maloor
2022-01-12 22:15 ` [PATCH mptcp-next v2 21/21] selftests: mptcp: functional tests for the userspace PM type Kishen Maloor
2022-01-12 22:35   ` selftests: mptcp: functional tests for the userspace PM type: Build Failure MPTCP CI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41b4eb-b482-cac0-558d-16a09a0f4f7@linux.intel.com \
    --to=mathew.j.martineau@linux.intel.com \
    --cc=kishen.maloor@intel.com \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.