5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-02 00:11:37 +00:00
This commit is contained in:
Arceliar 2018-06-14 08:00:57 -05:00
parent e7fca66655
commit 93ffc0b876

View File

@ -87,7 +87,7 @@ func (tun *tunDevice) setupAddress(addr string) error {
ar.ifra_prefixmask.sin6_len = uint8(unsafe.Sizeof(ar.ifra_prefixmask)) ar.ifra_prefixmask.sin6_len = uint8(unsafe.Sizeof(ar.ifra_prefixmask))
b := make([]byte, 16) b := make([]byte, 16)
binary.LittleEndian.PutUint16(b, uint16(0xFF00)) binary.LittleEndian.PutUint16(b, uint16(0xFE00))
ar.ifra_prefixmask.sin6_addr[0] = uint16(binary.BigEndian.Uint16(b)) ar.ifra_prefixmask.sin6_addr[0] = uint16(binary.BigEndian.Uint16(b))
ar.ifra_addr.sin6_len = uint8(unsafe.Sizeof(ar.ifra_addr)) ar.ifra_addr.sin6_len = uint8(unsafe.Sizeof(ar.ifra_addr))