[PATCH] getaddrinfo.c: support MPTCP

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Mar 10 20:06:35 GMT 2025



On 04/03/25 06:54, zhenwei pi wrote:
> There is a lack of MPTCP support from gaih_inet_typeproto array, add
> MPTCP entry.
> 
> Signed-off-by: zhenwei pi <zhenwei.pi@linux.dev>
> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
> ---
>  nss/getaddrinfo.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/nss/getaddrinfo.c b/nss/getaddrinfo.c
> index 21e899ff1d..efe6ad30d5 100644
> --- a/nss/getaddrinfo.c
> +++ b/nss/getaddrinfo.c
> @@ -143,6 +143,9 @@ static const struct gaih_typeproto gaih_inet_typeproto[] =
>  #ifdef IPPROTO_SCTP
>    { SOCK_STREAM, IPPROTO_SCTP, 0, false, "sctp" },
>    { SOCK_SEQPACKET, IPPROTO_SCTP, 0, false, "sctp" },
> +#endif
> +#ifdef IPPROTO_MPTCP
> +  { SOCK_STREAM, IPPROTO_MPTCP, 0, false, "mptcp" },
>  #endif
>    { SOCK_RAW, 0, GAI_PROTO_PROTOANY|GAI_PROTO_NOSERVICE, true, "raw" },
>    { 0, 0, 0, false, "" }

This is BZ#29609 and this looks good to me.  Maybe add a testcase to check
that if you specify the protocol different than '0' it should return an
entry instead of EAI_SOCKTYPE.


More information about the Libc-alpha mailing list