net/dns: log the correct error when NM Reapply fails.

Found while debugging #1870.

Signed-off-by: David Anderson <danderson@tailscale.com>
(cherry picked from commit 5bd38b10b4)
This commit is contained in:
David Anderson 2021-05-06 14:46:56 -07:00
parent 71bcaae29e
commit f2a38320f8

View File

@ -260,7 +260,7 @@ func (m *nmManager) trySet(ctx context.Context, config OSConfig) error {
}
if call := device.CallWithContext(ctx, "org.freedesktop.NetworkManager.Device.Reapply", 0, settings, version, uint32(0)); call.Err != nil {
return fmt.Errorf("reapply: %w", err)
return fmt.Errorf("reapply: %w", call.Err)
}
return nil