From 6ef02284c56d1b7de304e810d9e558579c0facf9 Mon Sep 17 00:00:00 2001 From: Leigh B Stoller Date: Fri, 9 May 2014 11:37:30 -0600 Subject: [PATCH] Minor bug fixes. --- clientside/tmcc/linux/xen/emulab-cnet.pl | 4 ++-- clientside/tmcc/linux/xen/libvnode_xen.pm | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/clientside/tmcc/linux/xen/emulab-cnet.pl b/clientside/tmcc/linux/xen/emulab-cnet.pl index 969b277a2..e94fab1ac 100755 --- a/clientside/tmcc/linux/xen/emulab-cnet.pl +++ b/clientside/tmcc/linux/xen/emulab-cnet.pl @@ -254,7 +254,7 @@ sub Online() " -j OUTGOING_${vnode_id}") == 0 or return -1; - DoIPtables("-A OUTPUT -d $vnode_id -j ACCEPT") + DoIPtables("-A OUTPUT -d $vnode_ip -j ACCEPT") == 0 or return -1; } # Start a tmcc proxy (handles both TCP and UDP) @@ -428,7 +428,7 @@ sub Offline() " --physdev-out $vif -j INCOMING_${vnode_id}"); DoIPtables("-D INPUT -s $vnode_ip ". " -j OUTGOING_${vnode_id}"); - DoIPtables("-D OUTPUT -d $vnode_id -j ACCEPT"); + DoIPtables("-D OUTPUT -d $vnode_ip -j ACCEPT"); } # tmcc diff --git a/clientside/tmcc/linux/xen/libvnode_xen.pm b/clientside/tmcc/linux/xen/libvnode_xen.pm index 3d5c3db35..c305b733e 100644 --- a/clientside/tmcc/linux/xen/libvnode_xen.pm +++ b/clientside/tmcc/linux/xen/libvnode_xen.pm @@ -554,6 +554,12 @@ sub rootPreConfig($) # # Need these to avoid overflowing the NAT tables. # + mysystem2("$MODPROBE nf_conntrack"); + if ($?) { + print STDERR "ERROR: could not load nf_conntrack module!\n"; + TBScriptUnlock(); + return -1; + } mysystem("$SYSCTL -w ". " net.netfilter.nf_conntrack_generic_timeout=120"); mysystem("$SYSCTL -w ". -- GitLab