mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Check link-local in tcp.go, track direction in link.go, fix compile error for mobile.go
This commit is contained in:
parent
ec5f7d9879
commit
43f798e82e
5 changed files with 25 additions and 24 deletions
|
@ -284,8 +284,9 @@ func (iface *tcpInterface) handler(sock net.Conn, incoming bool) {
|
|||
stream.init(sock)
|
||||
local, _, _ := net.SplitHostPort(sock.LocalAddr().String())
|
||||
remote, _, _ := net.SplitHostPort(sock.RemoteAddr().String())
|
||||
remotelinklocal := net.ParseIP(remote).IsLinkLocalUnicast()
|
||||
name := "tcp://" + sock.RemoteAddr().String()
|
||||
link, err := iface.core.link.create(&stream, name, "tcp", local, remote)
|
||||
link, err := iface.core.link.create(&stream, name, "tcp", local, remote, incoming, remotelinklocal)
|
||||
if err != nil {
|
||||
iface.core.log.Println(err)
|
||||
panic(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue