Fix CKR (IPv4/IPv6) in TAP mode so frames sent to node MAC, base MAC/LL from node IPv6 address

This commit is contained in:
Neil Alexander 2018-11-10 18:33:52 +00:00
parent adc32fe92f
commit 6fab0e9507
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 18 additions and 3 deletions

View file

@ -67,8 +67,8 @@ func (i *icmpv6) init(t *tunDevice) {
i.mylladdr = net.IP{
0xFE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFE}
copy(i.mymac[1:], i.tun.core.boxPub[:])
copy(i.mylladdr[9:], i.tun.core.boxPub[:])
copy(i.mymac[:], i.tun.core.router.addr[:])
copy(i.mylladdr[9:], i.tun.core.router.addr[1:])
}
// Parses an incoming ICMPv6 packet. The packet provided may be either an