Commit ae1c3b05 authored by Lionel Gauthier's avatar Lionel Gauthier

icmp redirects

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6073 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent fb9dd1a4
...@@ -254,15 +254,7 @@ int spgw_config_init(char* lib_config_file_name_pP, spgw_config_t* config_pP) { ...@@ -254,15 +254,7 @@ int spgw_config_init(char* lib_config_file_name_pP, spgw_config_t* config_pP) {
free(cidr); free(cidr);
#if defined (ENABLE_USE_GTPU_IN_KERNEL) #if defined (ENABLE_USE_GTPU_IN_KERNEL)
if (snprintf(system_cmd, 128, system("echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects");
"echo 0 > /proc/sys/net/ipv4/conf/%s/send_redirects",
config_pP->sgw_config.ipv4.sgw_interface_name_for_S1u_S12_S4_up) > 0) {
SPGW_APP_INFO("Disable send ICMP redirect: %s\n",system_cmd);
system(system_cmd);
} else {
SPGW_APP_ERROR("Disable send ICMP redirect for %s\n",
config_pP->sgw_config.ipv4.sgw_interface_name_for_S1u_S12_S4_up);
}
#endif #endif
in_addr_var.s_addr = config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S1u_S12_S4_up; in_addr_var.s_addr = config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S1u_S12_S4_up;
SPGW_APP_INFO("Parsing configuration file found sgw_ipv4_address_for_S1u_S12_S4_up: %s/%d on %s\n", SPGW_APP_INFO("Parsing configuration file found sgw_ipv4_address_for_S1u_S12_S4_up: %s/%d on %s\n",
...@@ -348,7 +340,8 @@ int spgw_config_init(char* lib_config_file_name_pP, spgw_config_t* config_pP) { ...@@ -348,7 +340,8 @@ int spgw_config_init(char* lib_config_file_name_pP, spgw_config_t* config_pP) {
#if defined (ENABLE_USE_GTPU_IN_KERNEL) #if defined (ENABLE_USE_GTPU_IN_KERNEL)
if (snprintf(system_cmd, 128, if (snprintf(system_cmd, 128,
"iptables -I POSTROUTING -t mangle -o %s -m state --state NEW -m mark ! --mark 0 ! --protocol sctp -j CONNMARK --save-mark", //"iptables -I POSTROUTING -t mangle -o %s -m state --state NEW -m mark ! --mark 0 ! --protocol sctp -j CONNMARK --save-mark",
"iptables -I POSTROUTING -t mangle -o %s -m mark ! --mark 0 ! --protocol sctp -j CONNMARK --save-mark",
config_pP->pgw_config.ipv4.pgw_interface_name_for_SGI) > 0) { config_pP->pgw_config.ipv4.pgw_interface_name_for_SGI) > 0) {
SPGW_APP_INFO("Save mark: %s\n",system_cmd); SPGW_APP_INFO("Save mark: %s\n",system_cmd);
system(system_cmd); system(system_cmd);
......
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