From cb0dc365082788bcc896f0b55c4807b72c2ac338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20B=C3=BCtler?= <48495685+fbuetler@users.noreply.github.com> Date: Fri, 5 Apr 2024 08:47:22 +0200 Subject: [PATCH] pan: fix GetPath if the connection is within the same AS (#253) Co-authored-by: Marc Frei --- pkg/pan/udp_dial.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/pan/udp_dial.go b/pkg/pan/udp_dial.go index 5ef55aad..1065e705 100644 --- a/pkg/pan/udp_dial.go +++ b/pkg/pan/udp_dial.go @@ -98,6 +98,9 @@ func (c *dialedConn) LocalAddr() net.Addr { } func (c *dialedConn) GetPath() *Path { + if c.selector == nil { + return nil + } return c.selector.Path() }