check error in correct place
This commit is contained in:
parent
f00e344a72
commit
1572a78d6c
8
up.go
8
up.go
@ -42,6 +42,10 @@ func CreateLink(conf *DsnetConfig) {
|
|||||||
|
|
||||||
// bring up interface (UNKNOWN state instead of UP, a wireguard quirk)
|
// bring up interface (UNKNOWN state instead of UP, a wireguard quirk)
|
||||||
err = netlink.LinkSetUp(link)
|
err = netlink.LinkSetUp(link)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
ExitFail("Could not bring up device '%s' (%v)", conf.InterfaceName, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConfigureDevice(conf *DsnetConfig) {
|
func ConfigureDevice(conf *DsnetConfig) {
|
||||||
@ -61,8 +65,4 @@ func ConfigureDevice(conf *DsnetConfig) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
ExitFail("Could not configure device '%s' (%v)", conf.InterfaceName, err)
|
ExitFail("Could not configure device '%s' (%v)", conf.InterfaceName, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
ExitFail("Could not bring up device '%s' (%v)", conf.InterfaceName, err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user