WireGuard Archive on lore.kernel.org
 help / Atom feed
* wireguard-go foreground mode broken on Linux
@ 2018-12-03 10:06 Chris Branch
  2018-12-06 16:18 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Branch @ 2018-12-03 10:06 UTC (permalink / raw)
  To: WireGuard

[-- Attachment #1.1: Type: text/plain, Size: 509 bytes --]

Though this isn't a common use case, I thought I should note that commit
2e772194cf7cd7c37d24364a9f9d407dc96a25e8 causes a regression in
wireguard-go running in foreground mode (-f flag); packets are never read
from the TUN interface.

I got as far as debugging that it works again if you call Fd() at least
once after SetNonblock i.e. it's not introduced by any of the other changes
in that commit. I've stopped looking at this for now, but thought I would
warn others and see if anyone else has some ideas.

[-- Attachment #1.2: Type: text/html, Size: 567 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: wireguard-go foreground mode broken on Linux
  2018-12-03 10:06 wireguard-go foreground mode broken on Linux Chris Branch
@ 2018-12-06 16:18 ` Jason A. Donenfeld
       [not found]   ` <CAHmME9pyCqLvTOBHCFYttJJzYGSyf26Way1FmhUtr0NvB8jU6Q@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2018-12-06 16:18 UTC (permalink / raw)
  To: cbranch; +Cc: WireGuard mailing list

Thanks, nice catch. Let me know if this fixes it for you:

https://git.zx2c4.com/wireguard-go/commit/?id=651744561e9e31197d8ebb59f97ab3dae3c39687
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: wireguard-go foreground mode broken on Linux
       [not found]     ` <CAMhRzNQ6QwgGT4_LTrVrZ-8LL8bO=T5roFzLRdyGWwVHChvf2w@mail.gmail.com>
@ 2018-12-06 16:37       ` Jason A. Donenfeld
  2018-12-06 16:40         ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2018-12-06 16:37 UTC (permalink / raw)
  To: cbranch, WireGuard mailing list

On Thu, Dec 6, 2018 at 5:31 PM Chris Branch <cbranch@cloudflare.com> wrote:
> Your solution is the same one I tried, but I wasn't yet convinced it was the right one. I'll take it though!

Did you run into issues with it? Or had particular doubts I should consider?
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: wireguard-go foreground mode broken on Linux
  2018-12-06 16:37       ` Jason A. Donenfeld
@ 2018-12-06 16:40         ` Jason A. Donenfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Jason A. Donenfeld @ 2018-12-06 16:40 UTC (permalink / raw)
  To: cbranch, WireGuard mailing list

On Thu, Dec 6, 2018 at 5:37 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> On Thu, Dec 6, 2018 at 5:31 PM Chris Branch <cbranch@cloudflare.com> wrote:
> > Your solution is the same one I tried, but I wasn't yet convinced it was the right one. I'll take it though!
>
> Did you run into issues with it? Or had particular doubts I should consider?

In case it helps in understanding this, the condition I'm trying to
enforce, rather than the hack that the fix commit removed, is that
rwcancel alone is responsible for calling SetNonblock, and after
rwcancel is instantiated, nobody calls .Fd() ever again, but instead
relies on the stored tun.fd member for access.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03 10:06 wireguard-go foreground mode broken on Linux Chris Branch
2018-12-06 16:18 ` Jason A. Donenfeld
     [not found]   ` <CAHmME9pyCqLvTOBHCFYttJJzYGSyf26Way1FmhUtr0NvB8jU6Q@mail.gmail.com>
     [not found]     ` <CAMhRzNQ6QwgGT4_LTrVrZ-8LL8bO=T5roFzLRdyGWwVHChvf2w@mail.gmail.com>
2018-12-06 16:37       ` Jason A. Donenfeld
2018-12-06 16:40         ` Jason A. Donenfeld

WireGuard Archive on lore.kernel.org

Archives are clonable: git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox