aboutsummaryrefslogtreecommitdiff
path: root/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-05-17 13:50:43 -0700
committerdavidevinavil <davidevinavil@gmail.com>2017-01-21 18:20:40 +0100
commit9b2f586aa30c3802a7663a25cf98eb8f06309d2f (patch)
treedf43e5bb7aeb9957b31ebdfbdce45baec7744f20 /data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
parent11e7b3c6aa71b15800f7cf989ac71bbd85a68e51 (diff)
z2_plus: Update IPA connection manager to 1.0 branch
Change-Id: I20555a4bd9981f652f71360bdb7d83e822fad883
Diffstat (limited to 'data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp')
-rw-r--r--data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp b/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
index bcb5b6b..073dc98 100644
--- a/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
+++ b/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
@@ -174,7 +174,8 @@ static int ipacm_cfg_xml_parse_tree
IPACM_util_icmp_string((char*)xml_node->name, SUBNET_TAG) == 0 ||
IPACM_util_icmp_string((char*)xml_node->name, IPACMALG_TAG) == 0 ||
IPACM_util_icmp_string((char*)xml_node->name, ALG_TAG) == 0 ||
- IPACM_util_icmp_string((char*)xml_node->name, IPACMNat_TAG) == 0)
+ IPACM_util_icmp_string((char*)xml_node->name, IPACMNat_TAG) == 0 ||
+ IPACM_util_icmp_string((char*)xml_node->name, IP_PassthroughFlag_TAG) == 0)
{
if (0 == IPACM_util_icmp_string((char*)xml_node->name, IFACE_TAG))
{
@@ -196,6 +197,27 @@ static int ipacm_cfg_xml_parse_tree
/* go to child */
ret_val = ipacm_cfg_xml_parse_tree(xml_node->children, config);
}
+ else if (IPACM_util_icmp_string((char*)xml_node->name, IP_PassthroughMode_TAG) == 0)
+ {
+ IPACMDBG_H("inside IP Passthrough\n");
+ content = IPACM_read_content_element(xml_node);
+ if (content)
+ {
+ str_size = strlen(content);
+ memset(content_buf, 0, sizeof(content_buf));
+ memcpy(content_buf, (void *)content, str_size);
+ if (atoi(content_buf))
+ {
+ config->ip_passthrough_mode = true;
+ IPACMDBG_H("Passthrough enable %d buf(%d)\n", config->ip_passthrough_mode, atoi(content_buf));
+ }
+ else
+ {
+ config->ip_passthrough_mode = false;
+ IPACMDBG_H("Passthrough enable %d buf(%d)\n", config->ip_passthrough_mode, atoi(content_buf));
+ }
+ }
+ }
else if (IPACM_util_icmp_string((char*)xml_node->name, ODUMODE_TAG) == 0)
{
IPACMDBG_H("inside ODU-XML\n");
@@ -246,7 +268,7 @@ static int ipacm_cfg_xml_parse_tree
str_size = strlen(content);
memset(content_buf, 0, sizeof(content_buf));
memcpy(content_buf, (void *)content, str_size);
- strncpy(config->iface_config.iface_entries[config->iface_config.num_iface_entries - 1].iface_name, content_buf, str_size);
+ strlcpy(config->iface_config.iface_entries[config->iface_config.num_iface_entries - 1].iface_name, content_buf, str_size+1);
IPACMDBG_H("Name %s\n", config->iface_config.iface_entries[config->iface_config.num_iface_entries - 1].iface_name);
}
}