Check link-local in tcp.go, track direction in link.go, fix compile error for mobile.go

This commit is contained in:
Neil Alexander 2019-02-01 00:02:17 +00:00
parent ec5f7d9879
commit 43f798e82e
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 25 additions and 24 deletions

View file

@ -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)