Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: "Roman Mamedov" <rm@romanrm.net>, "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:18:47 +0300	[thread overview]
Message-ID: <24c6fa52-a512-a01e-5351-90cb33a32a3f@msgid.tls.msk.ru> (raw)
In-Reply-To: <20230219233118.2d9654f9@nvm>

19.02.2023 21:31, Roman Mamedov пишет:
> 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?

No.  It is not memcmp.

/mjt

      reply	other threads:[~2023-02-19 20:23 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
2023-02-19 20:18   ` Michael Tokarev [this message]

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=24c6fa52-a512-a01e-5351-90cb33a32a3f@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=Jason@zx2c4.com \
    --cc=dxld@darkboxed.org \
    --cc=rm@romanrm.net \
    --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).