From b38082760fc411a8fc9e74f9c2d3a44ad633db5c Mon Sep 17 00:00:00 2001 From: Igor Shaula Date: Fri, 30 Mar 2018 14:25:08 +0200 Subject: Support additional MAC format in config file Add support for space-divided bytes in MAC string. Support the same format as in "pkt inline". Change-Id: I7f2136c4424c45ce4abad4082470c9c9b1b3ab05 Signed-off-by: Igor Shaula --- VNFs/DPPD-PROX/parse_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VNFs/DPPD-PROX/parse_utils.c b/VNFs/DPPD-PROX/parse_utils.c index 52337ffb..32db5de6 100644 --- a/VNFs/DPPD-PROX/parse_utils.c +++ b/VNFs/DPPD-PROX/parse_utils.c @@ -430,6 +430,8 @@ int parse_mac(struct ether_addr *ether_addr, const char *str2) return -1; uint8_t ret = rte_strsplit(str, strlen(str), addr_parts, 7, ':'); + if (ret != 6) + ret = rte_strsplit(str, strlen(str), addr_parts, 7, ' '); if (ret != 6) { set_errf("Invalid MAC address format"); -- cgit 1.2.3-korg