projects
/
invirt/packages/invirt-dhcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix XVM's classic networking problem
[invirt/packages/invirt-dhcp.git]
/
invirt-dhcpserver
diff --git
a/invirt-dhcpserver
b/invirt-dhcpserver
index
6ffcbda
..
20a0816
100755
(executable)
--- a/
invirt-dhcpserver
+++ b/
invirt-dhcpserver
@@
-99,7
+99,7
@@
class DhcpBackend:
# in use.
for viftype in ('tap', 'vif'):
vif = '%s%s.%s' % (viftype, domid, vifnum)
# in use.
for viftype in ('tap', 'vif'):
vif = '%s%s.%s' % (viftype, domid, vifnum)
- if Interface.exists(vif):
+ if Interfaces.exists(vif):
self.add_route_and_arp(nic.ip, vif, nic.gateway)
xsc.close()
return vif
self.add_route_and_arp(nic.ip, vif, nic.gateway)
xsc.close()
return vif
@@
-413,7
+413,7
@@
class ArpspoofWorker(Thread):
while True:
(ip, gw) = self.queue.get()
try:
while True:
(ip, gw) = self.queue.get()
try:
- p = Popen(['timeout', '5', 'arpspoof', '-i', self.iface, '-t', gw, ip], stdout=PIPE, stderr=PIPE)
+ p = Popen(['timeout', '-s', 'KILL', '5', 'arpspoof', '-i', self.iface, '-t', gw, ip], stdout=PIPE, stderr=PIPE)
(out, err) = p.communicate()
if p.returncode != 124:
s.syslog(s.LOG_ERR, "arpspoof returned %s for IP %s gateway %s" % (p.returncode, ip, gw))
(out, err) = p.communicate()
if p.returncode != 124:
s.syslog(s.LOG_ERR, "arpspoof returned %s for IP %s gateway %s" % (p.returncode, ip, gw))