mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
wgengine{,/router}: annotate some more errors
Updates #3351 Change-Id: I8b4f957d2051b3e29401bb449dbadbdada3a7c46 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
5294125e7a
commit
0350cf0438
@ -245,13 +245,13 @@ func (r *linuxRouter) Up() error {
|
||||
return err
|
||||
}
|
||||
if err := r.addIPRules(); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("adding IP rules: %w", err)
|
||||
}
|
||||
if err := r.setNetfilterMode(netfilterOff); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("setting netfilter mode: %w", err)
|
||||
}
|
||||
if err := r.upInterface(); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("bringing interface up: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -389,11 +389,11 @@ func NewUserspaceEngine(logf logger.Logf, conf Config) (_ Engine, reterr error)
|
||||
|
||||
e.logf("Bringing wireguard device up...")
|
||||
if err := e.wgdev.Up(); err != nil {
|
||||
return nil, fmt.Errorf("wgdev.Up(): %w", err)
|
||||
return nil, fmt.Errorf("wgdev.Up: %w", err)
|
||||
}
|
||||
e.logf("Bringing router up...")
|
||||
if err := e.router.Up(); err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("router.Up: %w", err)
|
||||
}
|
||||
|
||||
// It's a little pointless to apply no-op settings here (they
|
||||
@ -401,7 +401,7 @@ func NewUserspaceEngine(logf logger.Logf, conf Config) (_ Engine, reterr error)
|
||||
// router implementation early on.
|
||||
e.logf("Clearing router settings...")
|
||||
if err := e.router.Set(nil); err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("router.Set(nil): %w", err)
|
||||
}
|
||||
e.logf("Starting link monitor...")
|
||||
e.linkMon.Start()
|
||||
|
Loading…
Reference in New Issue
Block a user