From fd72a6505e18c66a31843708bb69a41739b97a84 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Thu, 13 Dec 2018 12:52:02 +0100 Subject: Add support for configurable arp timers in L3 mode L3 mode supports two timers: - arp_update_time, defaulted to 1 second, which makes PROX to send arp request every second for active flows - arp_timeout, previously defaulted to 30 seconds, which makes PROX consider a MAC address as invalid if no arp_reply was received within those 30 seconds. Those timers values were hardcoded. They can now be configured through the configuration file (within the core section), using resp. "arp update time" and "arp timeout" keywords. Unit is milli seconds. The default becomes respectively 1 second and 2 weeks. Change-Id: I35e46e97df32ca44c2cdfae85a20ee015de5d6e1 Signed-off-by: Xavier Simonart --- VNFs/DPPD-PROX/prox_args.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'VNFs/DPPD-PROX/prox_args.c') diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c index 59c514fc..d77eab1a 100644 --- a/VNFs/DPPD-PROX/prox_args.c +++ b/VNFs/DPPD-PROX/prox_args.c @@ -1362,6 +1362,10 @@ static int get_core_cfg(unsigned sindex, char *str, void *data) if (STR_EQ(str, "local ipv6")) { /* source IPv6 address to be used for packets */ return parse_ip6(&targ->local_ipv6, pkey); } + if (STR_EQ(str, "arp timeout")) + return parse_int(&targ->arp_timeout, pkey); + if (STR_EQ(str, "arp update time")) + return parse_int(&targ->arp_update_time, pkey); if (STR_EQ(str, "number of packets")) return parse_int(&targ->n_pkts, pkey); if (STR_EQ(str, "pipes")) { -- cgit 1.2.3-korg