File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,18 @@ func New(bridgeName string) (*Network, error) {
30
30
// Locate the TAP interface
31
31
tapLink , err := netlink .LinkByName (tapName )
32
32
if err != nil {
33
- return nil , fmt .Errorf ("bridge %q not found: %v" , bridgeName , err )
33
+ return nil , fmt .Errorf ("failed to find the TAP interface %q that we've just created: %v" ,
34
+ tapName , err )
35
+ }
36
+
37
+ // Bring the TAP interface up
38
+ if err := netlink .LinkSetUp (tapLink ); err != nil {
39
+ return nil , fmt .Errorf ("failed to bring the TAP interface %q up: %v" , tapName , err )
34
40
}
35
41
36
42
// Attach the TAP interface to the bridge
37
43
if err := netlink .LinkSetMaster (tapLink , bridgeLink ); err != nil {
38
- return nil , fmt .Errorf ("failed to attach TAP interface %q to the bridge interface %q: %v" ,
44
+ return nil , fmt .Errorf ("failed to attach the TAP interface %q to the bridge %q: %v" ,
39
45
tapName , bridgeName , err )
40
46
}
41
47
You can’t perform that action at this time.
0 commit comments