mirror of
				https://github.com/yggdrasil-network/water.git
				synced 2025-10-31 17:25:09 +03:00 
			
		
		
		
	add ipv4 broadcast test
This commit is contained in:
		
							parent
							
								
									ecf657aba3
								
							
						
					
					
						commit
						965ca414a6
					
				
					 3 changed files with 117 additions and 0 deletions
				
			
		
							
								
								
									
										16
									
								
								ipv4_test_linux.go
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								ipv4_test_linux.go
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| package water | ||||
| 
 | ||||
| import ( | ||||
| 	"net" | ||||
| 	"os/exec" | ||||
| 	"testing" | ||||
| ) | ||||
| 
 | ||||
| func setupIfce(t *testing.T, ipNet net.IPNet, dev string) { | ||||
| 	if err := exec.Command("ip", "link", "set", dev, "up").Run(); err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| 	if err := exec.Command("ip", "addr", "add", ipNet.String(), "dev", dev).Run(); err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Song Gao
						Song Gao