mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +00:00
don't return an error if the source address is wrong, since this happens very frequently for link-local traffic
This commit is contained in:
parent
c6a7a077a3
commit
2726dc0076
@ -289,7 +289,9 @@ func (k *keyStore) writePC(bs []byte) (int, error) {
|
||||
copy(srcSubnet[:], bs[8:])
|
||||
copy(dstSubnet[:], bs[24:])
|
||||
if srcAddr != k.address && srcSubnet != k.subnet {
|
||||
return 0, errors.New("wrong source address")
|
||||
// This happens all the time due to link-local traffic
|
||||
// Don't send back an error, just drop it
|
||||
return 0, nil
|
||||
}
|
||||
buf := make([]byte, 1+len(bs), 65535)
|
||||
buf[0] = typeSessionTraffic
|
||||
|
Loading…
Reference in New Issue
Block a user