mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-23 06:18:46 +01:00
renamed uapiConn and lint errors
This commit is contained in:
parent
698ebe2287
commit
caf2229d3b
@ -29,7 +29,10 @@ func Create(iface string, address string) error {
|
||||
|
||||
// We need to create a wireguard-go device and listen to configuration requests
|
||||
tunDevice := device.NewDevice(tunIface, conn.NewDefaultBind(), device.NewLogger(device.LogLevelSilent, "[wiretrustee] "))
|
||||
tunDevice.Up()
|
||||
err = tunDevice.Up()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
uapi, err := getUAPI(iface)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -37,12 +40,12 @@ func Create(iface string, address string) error {
|
||||
|
||||
go func() {
|
||||
for {
|
||||
conn, err := uapi.Accept()
|
||||
uapiConn, err := uapi.Accept()
|
||||
if err != nil {
|
||||
log.Debugln(err)
|
||||
return
|
||||
}
|
||||
go tunDevice.IpcHandle(conn)
|
||||
go tunDevice.IpcHandle(uapiConn)
|
||||
}
|
||||
}()
|
||||
|
||||
|
@ -17,6 +17,9 @@ func assignAddr(address string, tunDevice tun.Device) error {
|
||||
var err error
|
||||
attrs := netlink.NewLinkAttrs()
|
||||
attrs.Name, err = tunDevice.Name()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
link := wgLink{
|
||||
attrs: &attrs,
|
||||
|
Loading…
Reference in New Issue
Block a user