5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-09 16:20:26 +00:00

Run gofmt -s -w .

This commit is contained in:
Neil Alexander 2018-02-14 11:46:10 +00:00
parent 0bf43b758f
commit 34b264067e

View File

@ -155,17 +155,17 @@ func (i *icmpv6) create_icmpv6_tap(dstmac macAddress, dst net.IP, mtype ipv6.ICM
return nil, err
}
// Create the response buffer
dataout := make([]byte, ETHER+ipv6.HeaderLen+len(mbody))
// Create the response buffer
dataout := make([]byte, ETHER+ipv6.HeaderLen+len(mbody))
// Populate the response ethernet headers
copy(dataout[:6], dstmac[:6])
copy(dataout[6:12], i.mymac[:])
binary.BigEndian.PutUint16(dataout[12:14], uint16(0x86DD))
// Populate the response ethernet headers
copy(dataout[:6], dstmac[:6])
copy(dataout[6:12], i.mymac[:])
binary.BigEndian.PutUint16(dataout[12:14], uint16(0x86DD))
// Copy the returned packet to our response ethernet frame
copy(dataout[ETHER:], ipv6packet)
return dataout, nil
// Copy the returned packet to our response ethernet frame
copy(dataout[ETHER:], ipv6packet)
return dataout, nil
}
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
}
func (i *icmpv6) handle_ndp(in []byte) ([]byte, error) {
// Ignore NDP requests for anything outside of fd00::/8
if in[8] != 0xFD {