#include <stdint.h>
#include <stdio.h>
#include "vnf_common.h"
+#include "gateway.h"
#include "pipeline_arpicmp_be.h"
#ifndef VNF_ACL
#include "lib_arp.h"
case 4:
{
uint32_t nhip;
- nhip = get_nh(ip_addr[0], &dest_if);
+ gw_get_nh_port_ipv4(*ip_addr, &dest_if, &nhip);
if (nhip)
return dest_if;
case 6:
{
uint8_t nhipv6[16];
- get_nh_ipv6((uint8_t *)ip_addr, &dest_if, &nhipv6[0]);
+ gw_get_nh_port_ipv6((uint8_t *)ip_addr, &dest_if, nhipv6);
+
if (dest_if != 0xff)
return dest_if;
return 0xff;
case 4:
{
uint32_t nhip;
- nhip = get_nh(ip_addr[0], &dest_if);
+
+ gw_get_nh_port_ipv4(*ip_addr, &dest_if, &nhip);
if (nhip)
return dest_if;
case 6:
{
uint8_t nhipv6[16];
- get_nh_ipv6((uint8_t *)ip_addr, &dest_if, &nhipv6[0]);
+
+ gw_get_nh_port_ipv6((uint8_t *)ip_addr, &dest_if, nhipv6);
if (dest_if != 0xff)
return dest_if;
return 0xff;
char result[len + 1];
memset(result, 0, sizeof(result));
- for (i = 0; input[i] != '\0'; i++) {
+ for (i = 0; (input[i] != '\0') && (i < PIPELINE_MAX_ARGS); i++) {
if (!isspace(input[i]))
result[j++] = input[i];
}
+ result[j] = '\0';
- strncpy(input, result, len);
+ strncpy(input, result, strlen(result));
}