/* * Test for the regression introduced by * * b9470c27607b ("inet: kill smallest_size and smallest_port") * * If we open an ipv4 socket on a port with reuseaddr we shouldn't reset the tb * when we open the ipv6 conterpart, which is what was happening previously.
*/ #include <errno.h> #include <error.h> #include <arpa/inet.h> #include <netinet/in.h> #include <stdbool.h> #include <stdio.h> #include <sys/socket.h> #include <sys/types.h> #include <unistd.h>
#define PORT 9999
int open_port(int ipv6, int any)
{ int fd = -1; int reuseaddr = 1; int v6only = 1; int addrlen; int ret = -1; struct sockaddr *addr; int family = ipv6 ? AF_INET6 : AF_INET;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.