Skip to content

Commit

Permalink
conn: linux: fix incorrect endpoint address
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Renoth <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
  • Loading branch information
minus7 authored and zx2c4 committed Nov 23, 2021
1 parent ffb742d commit dec2ddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conn/bind_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit dec2ddf

Please sign in to comment.