mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 11191:
Added global config to enable/disable rp_filter for domR.
previous commit: d966906374d4a0cb8fa57326a1f7625c871f64fd
Test Case-1 :
1) Set network.disable.rpfilter global config to true
2) Restart the domR
3) check the settings reflected in proc filesystem
- for public interface like eth2,eth3 : /proc/sys/net/ipv4/conf/eth2/rp_filter should have 0 , and rest other interfaces should have value of 1
Test Case-2 :
1) set network.disable.rpfilter global config to false
2) Restart the domR
3) check the settings reflected in proc filesystem
- for public interface like eth2,eth3 : /proc/sys/net/ipv4/conf/eth2/rp_filter should have 1 , and rest other interfaces should also have value of 1
This commit is contained in:
parent
145a4aad37
commit
470ffcb652
@ -186,10 +186,10 @@ disable_rpfilter() {
|
|||||||
disable_rpfilter_domR() {
|
disable_rpfilter_domR() {
|
||||||
log_it "cloud: disable rp_filter"
|
log_it "cloud: disable rp_filter"
|
||||||
log_it "disable rpfilter"
|
log_it "disable rpfilter"
|
||||||
sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf
|
|
||||||
if [ "$DISABLE_RP_FILTER" == "true" ]
|
if [ "$DISABLE_RP_FILTER" == "true" ]
|
||||||
then
|
then
|
||||||
log_it "cloud: disable rp_filter : updating proc"
|
log_it "cloud: disable rp_filter on public interfaces"
|
||||||
|
#FIXME : currently public interfaces are assumed as eth2 and eth3.
|
||||||
sed -i "s/net.ipv4.conf.eth2.rp_filter.*$/net.ipv4.conf.eth2.rp_filter = 0/" /etc/sysctl.conf
|
sed -i "s/net.ipv4.conf.eth2.rp_filter.*$/net.ipv4.conf.eth2.rp_filter = 0/" /etc/sysctl.conf
|
||||||
sed -i "s/net.ipv4.conf.eth3.rp_filter.*$/net.ipv4.conf.eth3.rp_filter = 0/" /etc/sysctl.conf
|
sed -i "s/net.ipv4.conf.eth3.rp_filter.*$/net.ipv4.conf.eth3.rp_filter = 0/" /etc/sysctl.conf
|
||||||
echo "0" > /proc/sys/net/ipv4/conf/eth2/rp_filter
|
echo "0" > /proc/sys/net/ipv4/conf/eth2/rp_filter
|
||||||
|
|||||||
@ -1227,6 +1227,14 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String rpValue = _configDao.getValue(Config.NetworkRouterRpFilter.key());
|
||||||
|
if (rpValue != null && rpValue.equalsIgnoreCase("true")) {
|
||||||
|
_disable_rp_filter = true;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
_disable_rp_filter = false;
|
||||||
|
}
|
||||||
if (router.getRole() == Role.DHCP_USERDATA) {
|
if (router.getRole() == Role.DHCP_USERDATA) {
|
||||||
type = "dhcpsrvr";
|
type = "dhcpsrvr";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user