mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 15:20:30 +00:00
Run gofmt -s -w .
This commit is contained in:
parent
0bf43b758f
commit
34b264067e
@ -155,17 +155,17 @@ func (i *icmpv6) create_icmpv6_tap(dstmac macAddress, dst net.IP, mtype ipv6.ICM
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the response buffer
|
// Create the response buffer
|
||||||
dataout := make([]byte, ETHER+ipv6.HeaderLen+len(mbody))
|
dataout := make([]byte, ETHER+ipv6.HeaderLen+len(mbody))
|
||||||
|
|
||||||
// Populate the response ethernet headers
|
// Populate the response ethernet headers
|
||||||
copy(dataout[:6], dstmac[:6])
|
copy(dataout[:6], dstmac[:6])
|
||||||
copy(dataout[6:12], i.mymac[:])
|
copy(dataout[6:12], i.mymac[:])
|
||||||
binary.BigEndian.PutUint16(dataout[12:14], uint16(0x86DD))
|
binary.BigEndian.PutUint16(dataout[12:14], uint16(0x86DD))
|
||||||
|
|
||||||
// Copy the returned packet to our response ethernet frame
|
// Copy the returned packet to our response ethernet frame
|
||||||
copy(dataout[ETHER:], ipv6packet)
|
copy(dataout[ETHER:], ipv6packet)
|
||||||
return dataout, nil
|
return dataout, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *icmpv6) create_icmpv6_tun(dst net.IP, mtype ipv6.ICMPType, mcode int, mbody []byte) ([]byte, error) {
|
func (i *icmpv6) create_icmpv6_tun(dst net.IP, mtype ipv6.ICMPType, mcode int, mbody []byte) ([]byte, error) {
|
||||||
@ -207,8 +207,6 @@ func (i *icmpv6) create_icmpv6_tun(dst net.IP, mtype ipv6.ICMPType, mcode int, m
|
|||||||
return responsePacket, nil
|
return responsePacket, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func (i *icmpv6) handle_ndp(in []byte) ([]byte, error) {
|
func (i *icmpv6) handle_ndp(in []byte) ([]byte, error) {
|
||||||
// Ignore NDP requests for anything outside of fd00::/8
|
// Ignore NDP requests for anything outside of fd00::/8
|
||||||
if in[8] != 0xFD {
|
if in[8] != 0xFD {
|
||||||
|
Loading…
Reference in New Issue
Block a user