mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	Copy sinfo.coords for safety
This commit is contained in:
		
							parent
							
								
									ebb4ec7c33
								
							
						
					
					
						commit
						c4e6894d6a
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -426,7 +426,8 @@ func (sinfo *sessionInfo) doSend(bs []byte) {
 | 
				
			||||||
		// To prevent using empty session keys
 | 
							// To prevent using empty session keys
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	coords := sinfo.coords
 | 
						var coords []byte
 | 
				
			||||||
 | 
						coords = append(coords, sinfo.coords...)
 | 
				
			||||||
	// Read IPv6 flowlabel field (20 bits).
 | 
						// Read IPv6 flowlabel field (20 bits).
 | 
				
			||||||
	// Assumes packet at least contains IPv6 header.
 | 
						// Assumes packet at least contains IPv6 header.
 | 
				
			||||||
	flowkey := uint64(bs[1]&0x0f)<<16 | uint64(bs[2])<<8 | uint64(bs[3])
 | 
						flowkey := uint64(bs[1]&0x0f)<<16 | uint64(bs[2])<<8 | uint64(bs[3])
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue