wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* [PATCH wireguard-go] conn: linux: fix incorrect endpoint address
@ 2021-11-23 19:03 Thomas Renoth
  2021-11-23 21:01 ` Jason A. Donenfeld
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Renoth @ 2021-11-23 19:03 UTC (permalink / raw)
  To: wireguard; +Cc: Thomas Renoth

Signed-off-by: Thomas Renoth <minus@mnus.de>
---
`wg show` just shows 0.0.0.0:<port> for peer endpoints currently.

 conn/bind_linux.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/conn/bind_linux.go b/conn/bind_linux.go
index 975a6ab..da0670a 100644
--- a/conn/bind_linux.go
+++ b/conn/bind_linux.go
@@ -275,7 +275,7 @@ func (end *LinuxSocketEndpoint) SrcIP() netip.Addr {
 
 func (end *LinuxSocketEndpoint) DstIP() netip.Addr {
 	if !end.isV6 {
-		return netip.AddrFrom4(end.src4().Src)
+		return netip.AddrFrom4(end.dst4().Addr)
 	} else {
 		return netip.AddrFrom16(end.dst6().Addr)
 	}
-- 
2.34.0


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

end of thread, other threads:[~2021-11-29 17:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 19:03 [PATCH wireguard-go] conn: linux: fix incorrect endpoint address Thomas Renoth
2021-11-23 21:01 ` Jason A. Donenfeld
2021-11-23 23:23   ` minus
2021-11-25 16:38     ` Jason A. Donenfeld
2021-11-29  0:24       ` wireguard-go fails to send/receive data minus
2021-11-29 17:34         ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).