wgengine/router: include command output if ip rule list fails.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2020-05-10 23:49:01 +00:00 committed by Dave Anderson
parent e83d02ffd1
commit 381b94d4d1

View File

@ -391,7 +391,7 @@ func (r *linuxRouter) addBypassRule() error {
func (r *linuxRouter) delBypassRule() error {
out, err := exec.Command("ip", "rule", "list", "priority", "10000").CombinedOutput()
if err != nil {
return err
return fmt.Errorf("listing ip rules: %v\n%s", err, out)
}
if len(out) == 0 {
// No rule exists.