mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Merge branch 'develop' of https://github.com/yggdrasil-network/yggdrasil-go into yggdrasil-network-develop
This commit is contained in:
commit
062e07be6f
2 changed files with 4 additions and 4 deletions
|
@ -185,14 +185,14 @@ func setLogLevel(loglevel string, logger *log.Logger) {
|
|||
type yggArgs struct {
|
||||
genconf bool
|
||||
useconf bool
|
||||
useconffile string
|
||||
normaliseconf bool
|
||||
confjson bool
|
||||
autoconf bool
|
||||
ver bool
|
||||
logto string
|
||||
getaddr bool
|
||||
getsnet bool
|
||||
useconffile string
|
||||
logto string
|
||||
loglevel string
|
||||
}
|
||||
|
||||
|
|
|
@ -114,11 +114,11 @@ func (tun *TunAdapter) _start() error {
|
|||
if tun.isOpen {
|
||||
return errors.New("TUN module is already started")
|
||||
}
|
||||
tun.config.RLock()
|
||||
defer tun.config.RUnlock()
|
||||
if tun.config == nil {
|
||||
return errors.New("no configuration available to TUN")
|
||||
}
|
||||
tun.config.RLock()
|
||||
defer tun.config.RUnlock()
|
||||
tun.addr = tun.rwc.Address()
|
||||
tun.subnet = tun.rwc.Subnet()
|
||||
addr := fmt.Sprintf("%s/%d", net.IP(tun.addr[:]).String(), 8*len(address.GetPrefix())-1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue