WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] tun: darwin: fix panic: close of closed channel
@ 2019-08-25  9:25 liuhaichao
  2019-08-25 15:22 ` Jason A. Donenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: liuhaichao @ 2019-08-25  9:25 UTC (permalink / raw)
  To: wireguard; +Cc: liuhaichao

From: liuhaichao <liuhaichao@bytedance.com>

Change-Id: Idd77fef05316f817e03a0f905ac5e6d53a6865f7
---
 tun/tun_darwin.go | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tun/tun_darwin.go b/tun/tun_darwin.go
index 0815495..07abc6b 100644
--- a/tun/tun_darwin.go
+++ b/tun/tun_darwin.go
@@ -296,8 +296,6 @@ func (tun *NativeTun) Close() error {
 	if tun.routeSocket != -1 {
 		unix.Shutdown(tun.routeSocket, unix.SHUT_RDWR)
 		err2 = unix.Close(tun.routeSocket)
-	} else if tun.events != nil {
-		close(tun.events)
 	}
 	if err1 != nil {
 		return err1
-- 
2.19.1

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

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

* Re: [PATCH] tun: darwin: fix panic: close of closed channel
  2019-08-25  9:25 [PATCH] tun: darwin: fix panic: close of closed channel liuhaichao
@ 2019-08-25 15:22 ` Jason A. Donenfeld
  2019-08-26  3:29   ` 刘海潮
  0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2019-08-25 15:22 UTC (permalink / raw)
  To: liuhaichao; +Cc: WireGuard mailing list

I was under the impression this was fixed with
https://git.zx2c4.com/wireguard-go/commit/?id=6d78f895579b114c93bd493ad8d61316fc5dd15a

What precisely is the bug you're seeing?
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

* Re: Re: [PATCH] tun: darwin: fix panic: close of closed channel
  2019-08-25 15:22 ` Jason A. Donenfeld
@ 2019-08-26  3:29   ` 刘海潮
  0 siblings, 0 replies; 3+ messages in thread
From: 刘海潮 @ 2019-08-26  3:29 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

I used the previous version, so this bug was triggered. But why should we close tun.events in two places.

> 在 2019年8月25日,23:22,Jason A. Donenfeld <Jason@zx2c4.com> 写道:
> 
> I was under the impression this was fixed with
> https://git.zx2c4.com/wireguard-go/commit/?id=6d78f895579b114c93bd493ad8d61316fc5dd15a
> 
> What precisely is the bug you're seeing?

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

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-25  9:25 [PATCH] tun: darwin: fix panic: close of closed channel liuhaichao
2019-08-25 15:22 ` Jason A. Donenfeld
2019-08-26  3:29   ` 刘海潮

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
	public-inbox-index wireguard

Example config snippet for mirrors

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.git