From 7c0883048413b5bce45739a3c6208f442465c1d5 Mon Sep 17 00:00:00 2001
From: Lionel Gauthier <lionel.gauthier@eurecom.fr>
Date: Fri, 16 Jan 2015 10:47:16 +0000
Subject: [PATCH] Too big packets > MTU received on SGI

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6401 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair-cn/SGW-LITE/spgw_config.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/openair-cn/SGW-LITE/spgw_config.c b/openair-cn/SGW-LITE/spgw_config.c
index 881633014f..e5906a1919 100755
--- a/openair-cn/SGW-LITE/spgw_config.c
+++ b/openair-cn/SGW-LITE/spgw_config.c
@@ -257,6 +257,17 @@ int spgw_config_process(spgw_config_t* config_pP) {
         }
     }
 
+    if (snprintf(system_cmd, 256,
+                 "ethtool -K %s tso off gso off gro off",
+                 config_pP->pgw_config.ipv4.pgw_interface_name_for_SGI) > 0) {
+        SPGW_APP_INFO("Disable tcp segmentation offload, generic segmentation offload: %s\n",system_cmd);
+        ret += spgw_system(system_cmd, SPGW_ABORT_ON_ERROR, __FILE__, __LINE__);
+    } else {
+        SPGW_APP_ERROR("Disable tcp segmentation offload, generic segmentation offload\n");
+       ret = -1;
+    }
+
+
     if (config_pP->pgw_config.pgw_masquerade_SGI) {
         inaddr.s_addr = config_pP->pgw_config.ipv4.pgw_ipv4_address_for_SGI;
         if (snprintf(system_cmd, 256,
@@ -660,6 +671,8 @@ int spgw_config_init(char* lib_config_file_name_pP, spgw_config_t* config_pP) {
               config_pP->pgw_config.ipv4.pgw_interface_name_for_S5_S8 = strdup(pgw_interface_name_for_S5_S8);
               IPV4_STR_ADDR_TO_INT_NWBO ( pgw_default_dns_ipv4_address,     config_pP->pgw_config.ipv4.default_dns_v4, "BAD IPv4 ADDRESS FORMAT FOR DEFAULT DNS !\n" )
               IPV4_STR_ADDR_TO_INT_NWBO ( pgw_default_dns_sec_ipv4_address, config_pP->pgw_config.ipv4.default_dns_sec_v4, "BAD IPv4 ADDRESS FORMAT FOR DEFAULT DNS SEC!\n" )
+          } else {
+              SPGW_APP_WARN("NO DNS CONFIGURATION FOUND\n");
           }
       }
   } else {
-- 
GitLab