diff options
-rw-r--r-- | nss/getaddrinfo.c | 3 | ||||
-rw-r--r-- | nss/tst-getaddrinfo3.c | 26 |
2 files changed, 29 insertions, 0 deletions
diff --git a/nss/getaddrinfo.c b/nss/getaddrinfo.c index 21e899f..efe6ad3 100644 --- a/nss/getaddrinfo.c +++ b/nss/getaddrinfo.c @@ -144,6 +144,9 @@ static const struct gaih_typeproto gaih_inet_typeproto[] = { 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, "" } }; diff --git a/nss/tst-getaddrinfo3.c b/nss/tst-getaddrinfo3.c index 5077f31..caea19b 100644 --- a/nss/tst-getaddrinfo3.c +++ b/nss/tst-getaddrinfo3.c @@ -144,6 +144,32 @@ getaddrinfo test %d return address of family %d, expected %d\n", \ hints.ai_socktype = SOCK_STREAM; T (10, 0, "::ffff:127.0.0.1", AF_INET6, "::ffff:127.0.0.1"); +#ifdef IPPROTO_MPTCP + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_MPTCP; + T (11, 0, "127.0.0.1", AF_INET, "127.0.0.1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_MPTCP; + T (12, 0, "127.0.0.1", AF_INET, "127.0.0.1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_MPTCP; + T (13, 0, "::ffff:127.0.0.1", AF_INET6, "::ffff:127.0.0.1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_MPTCP; + T (14, 0, "::ffff:127.0.0.1", AF_INET6, "::ffff:127.0.0.1"); +#endif + return result; } |