Commit b3260667 authored by Mike Hibler's avatar Mike Hibler

New style handling of rp_filter disabling.

The previous commit to disable it per-interface doesn't work when forwarding
packets. Apparently the kernel looks at the "all" value when doing this.
Now we just append the settings to /etc/sysctl.conf which is present in
Ubuntu and CentOS.
parent 1db761fc
......@@ -203,6 +203,9 @@ sysetc-install: dir-install ifcfgs
if [ "$(RCDIR)" != "$(SYSETCDIR)" ]; then \
ln -sf $(RRCDIR)/rc.local $(SYSETCDIR)/rc.local; \
fi
if [ -e $(SYSETCDIR)/sysctl.conf ]; then \
cat $(SRCDIR)/sysctl.conf.tail >> $(SYSETCDIR)/sysctl.conf; \
fi
sysetc-remove:
-rm -f $(RCDIR)/*/S95anacron $(RCDIR)/*/K05anacron
......
......@@ -758,12 +758,6 @@ sub os_ifconfig_line($$$$$$$$;$$$)
else {
$uplines .= sprintf($IFCONFIG, $iface, $inet, $mask);
$downlines = "$IFCONFIGBIN $iface down";
#
# XXX make sure we don't do reverse path filtering on the interface;
# our current route generator which will produce asymmetric routes.
#
$uplines .= "\n /sbin/sysctl net.ipv4.conf.$iface.rp_filter=0";
}
return ($uplines, $downlines);
......@@ -918,11 +912,6 @@ sub os_ifconfig_veth($$$$$;$$$$%)
# configure the MAC address.
$uplines .= "\n $IFCONFIGBIN $vdev hw ether $vmac"
if ($vmac);
#
# XXX make sure we don't do reverse path filtering on the interface;
# our current route generator which will produce asymmetric routes.
#
$uplines .= "\n /sbin/sysctl net.ipv4.conf.$vdev.rp_filter=0";
$downlines .= "$IFCONFIGBIN $vdev down\n ";
$downlines .= "$VLANCONFIG rem $vdev";
......
10-network-security.conf:net.ipv4.conf.default.rp_filter=0
10-network-security.conf:net.ipv4.conf.all.rp_filter=0
# rp_filter setting is now handled by /etc/sysctl.conf modification
# Mike says to do this for Frisbee.
sysctl net.core.rmem_max=1048576
sysctl net.core.wmem_max=1048576
net.core.rmem_max=1048576
net.core.wmem_max=1048576
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment