Re: [RESEND PATCH v3] wg: Support restricting address family of DNS resolved Endpoint

2023-02-19 Thread Michael Tokarev
19.02.2023 21:31, Roman Mamedov пишет: On Sun, 19 Feb 2023 19:04:28 +0100 Daniel Gröber wrote: +static inline bool parse_address_family(int *family, const char *value) +{ + if (strcmp(value, "inet") == 0) + *family = AF_INET; + else if (strcmp(value, "inet6") == 0) +

Re: [RESEND PATCH v3] wg: Support restricting address family of DNS resolved Endpoint

2023-02-19 Thread Roman Mamedov
On Sun, 19 Feb 2023 19:04:28 +0100 Daniel Gröber wrote: > +static inline bool parse_address_family(int *family, const char *value) > +{ > + if (strcmp(value, "inet") == 0) > + *family = AF_INET; > + else if (strcmp(value, "inet6") == 0) > + *family = AF_INET6;

[RESEND PATCH v3] wg: Support restricting address family of DNS resolved Endpoint

2023-02-19 Thread Daniel Gröber
When using wireguard tunnels for providing IPv6 connectivity to machines it can be important to pin which IP address family should be used. Consider a peer using a DNS name with both A/ records, wg will currently blindly follow system policy and use the first address returned by