Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Apr 2021 00:34:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 254212] can't initialize an if_wg interface with IPv6 disabled
Message-ID:  <bug-254212-227-Qu2qik3QZp@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-254212-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-254212-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254212

--- Comment #5 from Jason A. Donenfeld <jason@zx2c4.com> ---
Woof, I see what you mean now. That problem also applies to v4 sockets too!
Basically if there's no interface with an address in the family, then bind
fails. We could check for ret==EADDRNOTAVAIL and just let things continue in
that case, but the fact that this can happen for both v4 and v6 means the user
might find themselves in a very confusing state. Returning a failing rc from
the ioctl and maybe even warning in dmesg seems more useful. But I also wish
there was a more robust solution for this too. Maybe we should go in the
direction of allowing sockets to bind to 0.0.0.0 and ::/0 even in the case in
which there's not yet an interface with an address in that addr family? That'd
certainly make things easier. Thoughts?

-- 
You are receiving this mail because:
You are the assignee for the bug.

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254212-227-Qu2qik3QZp>