mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Run gofmt -s -w .
This commit is contained in:
		
							parent
							
								
									0bf43b758f
								
							
						
					
					
						commit
						34b264067e
					
				
					 1 changed files with 9 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -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 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue