4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-09 13:24:05 +00:00

Various API changes and simplifications to fix mobile builds

This commit is contained in:
Neil Alexander
2019-07-27 15:00:09 +01:00
parent 9b99f0b5e4
commit de1005e4fa
13 changed files with 63 additions and 122 deletions

View File

@ -108,10 +108,10 @@ func (s *tunConn) writer() error {
} else {
s.tun.log.Errorln(s.conn.String(), "TUN/TAP generic write error:", err)
}
} else if ispackettoobig, maxsize := e.PacketTooBig(); ispackettoobig {
} else if e.PacketTooBig() {
// TODO: This currently isn't aware of IPv4 for CKR
ptb := &icmp.PacketTooBig{
MTU: int(maxsize),
MTU: int(e.PacketMaximumSize()),
Data: b[:900],
}
if packet, err := CreateICMPv6(b[8:24], b[24:40], ipv6.ICMPTypePacketTooBig, 0, ptb); err == nil {