summaryrefslogtreecommitdiffstats
path: root/common/vnf_common/vnf_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/vnf_common/vnf_common.c')
-rw-r--r--common/vnf_common/vnf_common.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/vnf_common/vnf_common.c b/common/vnf_common/vnf_common.c
index 6ce815be..97f90210 100644
--- a/common/vnf_common/vnf_common.c
+++ b/common/vnf_common/vnf_common.c
@@ -47,12 +47,13 @@ uint8_t is_port_index_privte(uint16_t phy_port)
uint32_t get_prv_to_pub_port(uint32_t *ip_addr, uint8_t type)
{
uint32_t dest_if = 0xff;
+ struct ether_addr addr;
switch (type) {
case 4:
{
uint32_t nhip;
- nhip = get_nh(ip_addr[0], &dest_if);
+ nhip = get_nh(ip_addr[0], &dest_if, &addr);
if (nhip)
return dest_if;
@@ -62,7 +63,7 @@ uint32_t get_prv_to_pub_port(uint32_t *ip_addr, uint8_t type)
case 6:
{
uint8_t nhipv6[16];
- get_nh_ipv6((uint8_t *)ip_addr, &dest_if, &nhipv6[0]);
+ get_nh_ipv6((uint8_t *)ip_addr, &dest_if, &nhipv6[0], &addr);
if (dest_if != 0xff)
return dest_if;
return 0xff;
@@ -75,12 +76,13 @@ uint32_t get_prv_to_pub_port(uint32_t *ip_addr, uint8_t type)
uint32_t get_pub_to_prv_port(uint32_t *ip_addr, uint8_t type)
{
uint32_t dest_if = 0xff;
+ struct ether_addr addr;
switch (type) {
case 4:
{
uint32_t nhip;
- nhip = get_nh(ip_addr[0], &dest_if);
+ nhip = get_nh(ip_addr[0], &dest_if, &addr);
if (nhip)
return dest_if;
@@ -90,7 +92,7 @@ uint32_t get_pub_to_prv_port(uint32_t *ip_addr, uint8_t type)
case 6:
{
uint8_t nhipv6[16];
- get_nh_ipv6((uint8_t *)ip_addr, &dest_if, &nhipv6[0]);
+ get_nh_ipv6((uint8_t *)ip_addr, &dest_if, &nhipv6[0], &addr);
if (dest_if != 0xff)
return dest_if;
return 0xff;