mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
set socket option IPV6_MTU_DISCOVER=IP_PMTUDISC_PROBE for linux (#399)
This commit is contained in:
parent
b46a5b19bb
commit
d9b2c37837
3 changed files with 21 additions and 1 deletions
|
@ -85,6 +85,12 @@ CHECK_SYMBOL_EXISTS(
|
||||||
HAVE_IP_MTU_DISCOVER
|
HAVE_IP_MTU_DISCOVER
|
||||||
)
|
)
|
||||||
|
|
||||||
|
CHECK_SYMBOL_EXISTS(
|
||||||
|
IPV6_MTU_DISCOVER
|
||||||
|
"netinet/in.h"
|
||||||
|
HAVE_IPV6_MTU_DISCOVER
|
||||||
|
)
|
||||||
|
|
||||||
CHECK_SYMBOL_EXISTS(
|
CHECK_SYMBOL_EXISTS(
|
||||||
IP_DONTFRAG
|
IP_DONTFRAG
|
||||||
"netinet/in.h"
|
"netinet/in.h"
|
||||||
|
|
|
@ -964,6 +964,13 @@ sport_init_server (struct service_port *sport, struct lsquic_engine *engine,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if __linux__
|
||||||
|
else if (AF_INET6 == sa_local->sa_family)
|
||||||
|
{
|
||||||
|
int on = IP_PMTUDISC_PROBE;
|
||||||
|
s = setsockopt(sockfd, IPPROTO_IPV6, IPV6_MTU_DISCOVER, &on, sizeof(on));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1156,6 +1163,13 @@ sport_init_client (struct service_port *sport, struct lsquic_engine *engine,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if __linux__
|
||||||
|
else if (AF_INET6 == sa_local->sa_family)
|
||||||
|
{
|
||||||
|
int on = IP_PMTUDISC_PROBE;
|
||||||
|
s = setsockopt(sockfd, IPPROTO_IPV6, IPV6_MTU_DISCOVER, &on, sizeof(on));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#cmakedefine HAVE_REGEX 1
|
#cmakedefine HAVE_REGEX 1
|
||||||
#cmakedefine HAVE_PREADV 1
|
#cmakedefine HAVE_PREADV 1
|
||||||
|
|
||||||
#define LSQUIC_DONTFRAG_SUPPORTED (HAVE_IP_DONTFRAG || HAVE_IP_MTU_DISCOVER)
|
#define LSQUIC_DONTFRAG_SUPPORTED (HAVE_IP_DONTFRAG || HAVE_IP_MTU_DISCOVER || HAVE_IPV6_MTU_DISCOVER)
|
||||||
|
|
||||||
/* TODO: presumably it's the same on FreeBSD, test it.
|
/* TODO: presumably it's the same on FreeBSD, test it.
|
||||||
* See https://github.com/quicwg/base-drafts/wiki/ECN-in-QUIC
|
* See https://github.com/quicwg/base-drafts/wiki/ECN-in-QUIC
|
||||||
|
|
Loading…
Reference in a new issue