Commit 1348b878 authored by Lionel Gauthier's avatar Lionel Gauthier

reintegrate in trunk bug ue ip if setup

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7192 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 9d6a73df
...@@ -261,7 +261,7 @@ int esm_ebr_context_create( ...@@ -261,7 +261,7 @@ int esm_ebr_context_create(
// in_addr.s_addr); // in_addr.s_addr);
strcpy(ipv4_addr, tmp); strcpy(ipv4_addr, tmp);
if (IN_CLASSA(in_addr.s_addr)) { if (IN_CLASSA(ntohl(in_addr.s_addr))) {
netmask = "255.0.0.0"; netmask = "255.0.0.0";
in_addr.s_addr = pdn->ip_addr[0] << 24 | in_addr.s_addr = pdn->ip_addr[0] << 24 |
((255 << 16) & 0x00FF0000) | ((255 << 16) & 0x00FF0000) |
...@@ -273,7 +273,7 @@ int esm_ebr_context_create( ...@@ -273,7 +273,7 @@ int esm_ebr_context_create(
// "error in PDN IPv4 address %x", // "error in PDN IPv4 address %x",
// in_addr.s_addr); // in_addr.s_addr);
strcpy(broadcast, tmp); strcpy(broadcast, tmp);
} else if (IN_CLASSB(in_addr.s_addr)) { } else if (IN_CLASSB(ntohl(in_addr.s_addr))) {
netmask = "255.255.0.0"; netmask = "255.255.0.0";
in_addr.s_addr = pdn->ip_addr[0] << 24 | in_addr.s_addr = pdn->ip_addr[0] << 24 |
((pdn->ip_addr[1] << 16) & 0x00FF0000) | ((pdn->ip_addr[1] << 16) & 0x00FF0000) |
...@@ -285,7 +285,7 @@ int esm_ebr_context_create( ...@@ -285,7 +285,7 @@ int esm_ebr_context_create(
// "error in PDN IPv4 address %x", // "error in PDN IPv4 address %x",
// in_addr.s_addr); // in_addr.s_addr);
strcpy(broadcast, tmp); strcpy(broadcast, tmp);
} else if (IN_CLASSC(in_addr.s_addr)) { } else if (IN_CLASSC(ntohl(in_addr.s_addr))) {
netmask = "255.255.255.0"; netmask = "255.255.255.0";
in_addr.s_addr = pdn->ip_addr[0] << 24 | in_addr.s_addr = pdn->ip_addr[0] << 24 |
((pdn->ip_addr[1] << 16) & 0x00FF0000) | ((pdn->ip_addr[1] << 16) & 0x00FF0000) |
......
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