mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Highlight packets that exceed the agreed session MTU
This commit is contained in:
		
							parent
							
								
									9fb45d77fc
								
							
						
					
					
						commit
						844212e95b
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -145,6 +145,10 @@ func (r *router) sendPacket(bs []byte) {
 | 
				
			||||||
		fallthrough
 | 
							fallthrough
 | 
				
			||||||
	//default: go func() { sinfo.send<-bs }()
 | 
						//default: go func() { sinfo.send<-bs }()
 | 
				
			||||||
	default:
 | 
						default:
 | 
				
			||||||
 | 
							if len(bs) > int(sinfo.getMTU()) {
 | 
				
			||||||
 | 
								// TODO: Send ICMPv6 Packet Too Big back to the TUN/TAP adapter
 | 
				
			||||||
 | 
								sinfo.core.log.Printf("Packet length %d exceeds session MTU %d", len(bs), sinfo.getMTU())
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		select {
 | 
							select {
 | 
				
			||||||
		case sinfo.send <- bs:
 | 
							case sinfo.send <- bs:
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue