From: Roman Mamedov <rm@romanrm.net>
To: "Daniel Gröber" <dxld@darkboxed.org>
Cc: wireguard@lists.zx2c4.com, "Jason A . Donenfeld" <Jason@zx2c4.com>
Subject: Re: [RESEND PATCH v3] wg: Support restricting address family of DNS resolved Endpoint
Date: Sun, 19 Feb 2023 23:31:18 +0500 [thread overview]
Message-ID: <20230219233118.2d9654f9@nvm> (raw)
In-Reply-To: <20230219180428.438453-1-dxld@darkboxed.org>
On Sun, 19 Feb 2023 19:04:28 +0100
Daniel Gröber <dxld@darkboxed.org> 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;
Wouldn't the first condition match "inet6" as well, not ever checking the
second condition?
> + else if (strcmp(value, "unspec") == 0)
> + *family = AF_UNSPEC;
> + else
> + return false;
> +
> + return true;
> +}
--
With respect,
Roman
next prev parent reply other threads:[~2023-02-19 18:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-19 18:04 Daniel Gröber
2023-02-19 18:31 ` Roman Mamedov [this message]
2023-02-19 20:18 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230219233118.2d9654f9@nvm \
--to=rm@romanrm.net \
--cc=Jason@zx2c4.com \
--cc=dxld@darkboxed.org \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).