From 5a20b38e795d049c01eeb9e0749c309f357f2cae Mon Sep 17 00:00:00 2001 From: imdano <> Date: Fri, 29 Aug 2008 12:22:34 +0000 Subject: [PATCH] All branches/trunk: - Specify the device to use in SetDefaultRoute --- wicd/wnettools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wicd/wnettools.py b/wicd/wnettools.py index 6202a32..5674784 100644 --- a/wicd/wnettools.py +++ b/wicd/wnettools.py @@ -548,10 +548,11 @@ class Interface(object): gw -- gateway of the default route in dotted quad form """ + if not self.iface: return if not misc.IsValidIP(gw): print 'WARNING: Invalid gateway found. Aborting!' return False - cmd = 'route add default gw ' + gw + cmd = 'route add default gw %s dev %s' % (gw, self.iface) if self.verbose: print cmd misc.Run(cmd)