From e3c1354d27f53462801e1b86b4275699a6f9fdac Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 4 May 2025 17:54:57 +0200 Subject: [PATCH] tun/netstack: remove usage of pkt.IsNil() Since 3c75945fd ("netstack: remove PacketBuffer.IsNil()") this has been invalid. Follow the replacement pattern of that commit. The old definition inlined to the same code anyway: func (pk *PacketBuffer) IsNil() bool { return pk == nil } Signed-off-by: Jason A. Donenfeld --- tun/netstack/tun.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tun/netstack/tun.go b/tun/netstack/tun.go index 7279cd9..04f6986 100644 --- a/tun/netstack/tun.go +++ b/tun/netstack/tun.go @@ -155,7 +155,7 @@ func (tun *netTun) Write(buf [][]byte, offset int) (int, error) { func (tun *netTun) WriteNotify() { pkt := tun.ep.Read() - if pkt.IsNil() { + if pkt == nil { return }