diff options
Diffstat (limited to 'VNFs/vACL')
-rw-r--r-- | VNFs/vACL/Makefile | 2 | ||||
-rw-r--r-- | VNFs/vACL/pipeline/pipeline_acl.h | 2 | ||||
-rw-r--r-- | VNFs/vACL/pipeline/pipeline_acl_be.c | 15 |
3 files changed, 15 insertions, 4 deletions
diff --git a/VNFs/vACL/Makefile b/VNFs/vACL/Makefile index 0995f905..bf1502a2 100644 --- a/VNFs/vACL/Makefile +++ b/VNFs/vACL/Makefile @@ -66,7 +66,7 @@ CFLAGS += -I$(VNF_CORE)/common/VIL/gateway TOP = $(RTE_SDK)/../civetweb CFLAGS += -I$(TOP)/include $(COPT) -DUSE_WEBSOCKET -DUSE_IPV6 -DUSE_SSL_DH=1 CFLAGS += -DREST_API_SUPPORT -LDFLAGS += -ljson -lcrypto -lssl +LDFLAGS += -ljson-c -lcrypto -lssl LDFLAGS += -L$(RTE_SDK)/../civetweb/ -lcivetweb # all source are stored in SRCS-y diff --git a/VNFs/vACL/pipeline/pipeline_acl.h b/VNFs/vACL/pipeline/pipeline_acl.h index 93b92c45..a0ff84da 100644 --- a/VNFs/vACL/pipeline/pipeline_acl.h +++ b/VNFs/vACL/pipeline/pipeline_acl.h @@ -29,7 +29,7 @@ #include "pipeline.h" #include "pipeline_acl_be.h" #include <civetweb.h> -#include <json/json.h> +#include <json-c/json.h> /* ACL IPV4 and IPV6 enable flags for debugging (Default both on) */ extern int acl_ipv4_enabled; diff --git a/VNFs/vACL/pipeline/pipeline_acl_be.c b/VNFs/vACL/pipeline/pipeline_acl_be.c index d4b92109..5da2e36f 100644 --- a/VNFs/vACL/pipeline/pipeline_acl_be.c +++ b/VNFs/vACL/pipeline/pipeline_acl_be.c @@ -777,7 +777,13 @@ pkt_work_acl_key(struct rte_pipeline *p, uint32_t packet_length = rte_pktmbuf_pkt_len(pkt); uint32_t dest_if = INVALID_DESTIF; + uint32_t dst_phy_port = INVALID_DESTIF; uint32_t src_phy_port = pkt->port; + if(is_phy_port_privte(src_phy_port)) + dst_phy_port = prv_to_pub_map[src_phy_port]; + else + dst_phy_port = pub_to_prv_map[src_phy_port]; + if(is_gateway()){ @@ -794,7 +800,7 @@ pkt_work_acl_key(struct rte_pipeline *p, uint32_t nhip = 0; uint32_t dst_ip_addr = rte_bswap32(ipv4hdr->dst_addr); - gw_get_nh_port_ipv4(dst_ip_addr, &dest_if, &nhip); + gw_get_route_nh_port_ipv4(dst_ip_addr, &dest_if, &nhip, dst_phy_port); ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if, &dst_mac); @@ -1475,6 +1481,11 @@ pkt_work_acl_ipv4_key(struct rte_pipeline *p, uint32_t dest_if = INVALID_DESTIF; uint32_t src_phy_port = pkt->port; + uint32_t dst_phy_port = INVALID_DESTIF; + if(is_phy_port_privte(src_phy_port)) + dst_phy_port = prv_to_pub_map[src_phy_port]; + else + dst_phy_port = pub_to_prv_map[src_phy_port]; if(is_gateway()){ @@ -1493,7 +1504,7 @@ pkt_work_acl_ipv4_key(struct rte_pipeline *p, uint32_t src_phy_port = pkt->port; uint32_t dst_ip_addr = rte_bswap32(ipv4hdr->dst_addr); - gw_get_nh_port_ipv4(dst_ip_addr, &dest_if, &nhip); + gw_get_route_nh_port_ipv4(dst_ip_addr, &dest_if, &nhip, dst_phy_port); ret_arp_data = get_dest_mac_addr_ipv4(nhip, dest_if, &dst_mac); |