mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	make offset generic over TUN_OFFSET_BYTES so we can make this platform dependent
This commit is contained in:
		
							parent
							
								
									f6f9b3ef76
								
							
						
					
					
						commit
						2982b53555
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -31,7 +31,7 @@ func (w *tunWriter) _write(b []byte) {
 | 
			
		|||
	if n == 0 {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	written, err = w.tun.iface.Write(append([]byte{0, 0, 0, 0}, b[:n]...), TUN_OFFSET_BYTES)
 | 
			
		||||
	written, err = w.tun.iface.Write(append(make([]byte, TUN_OFFSET_BYTES), b[:n]...), TUN_OFFSET_BYTES)
 | 
			
		||||
	util.PutBytes(b)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		w.tun.Act(w, func() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue