File tree 1 file changed +30
-2
lines changed
test/integration-test/src
1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use std::{
4
4
ffi:: CStr ,
5
5
io,
6
6
net:: Ipv4Addr ,
7
- process,
7
+ process:: { self , Command } ,
8
8
sync:: atomic:: { AtomicU64 , Ordering } ,
9
9
} ;
10
10
@@ -67,7 +67,35 @@ impl NetNsGuard {
67
67
unsafe { netlink_set_link_up ( lo_idx as i32 ) }
68
68
. unwrap_or_else ( |e| panic ! ( "Failed to set `lo` up in netns {}: {e}" , name) ) ;
69
69
70
- setup_test_veth_pair ( ) ;
70
+ //setup_test_veth_pair();
71
+ Command :: new ( "ip" )
72
+ . args ( & [
73
+ "link" ,
74
+ "add" ,
75
+ "dev" ,
76
+ IF_NAME_1 . to_str ( ) . unwrap ( ) ,
77
+ "type" ,
78
+ "veth" ,
79
+ "peer" ,
80
+ "name" ,
81
+ IF_NAME_2 . to_str ( ) . unwrap ( ) ,
82
+ ] )
83
+ . status ( )
84
+ . unwrap_or_else ( |e| {
85
+ panic ! (
86
+ "Failed to set up veth pair ({}, {}): {e}" ,
87
+ IF_NAME_1 . to_string_lossy( ) ,
88
+ IF_NAME_2 . to_string_lossy( )
89
+ )
90
+ } )
91
+ . exit_ok ( )
92
+ . unwrap_or_else ( |e| {
93
+ panic ! (
94
+ "Failed to set up veth pair ({}, {}): {e}" ,
95
+ IF_NAME_1 . to_string_lossy( ) ,
96
+ IF_NAME_2 . to_string_lossy( )
97
+ )
98
+ } ) ;
71
99
72
100
let if_idx1 = unsafe { if_nametoindex ( IF_NAME_1 . as_ptr ( ) ) } ;
73
101
if if_idx1 == 0 {
You can’t perform that action at this time.
0 commit comments