#define IN6ADDRSZ 16
#define MAX_PORTS 32
-static int my_inet_pton_ipv6(int af, const char *src, void *dst);
+int my_inet_pton_ipv6(int af, const char *src, void *dst);
static int inet_pton_ipv6(const char *src, unsigned char *dst);
static int inet_pton_ipv4(const char *src, unsigned char *dst);
static void local_arp_cache_init(void);
struct arp_timer_key *arp_key = (struct arp_timer_key *)arg;
lib_arp_delete_called++;
- rte_timer_stop(ret_arp_data->timer);
- rte_free(ret_arp_data->timer_key);
- rte_free(ret_arp_data->buf_pkts);
- ret_arp_data->buf_pkts = NULL;
+ if (ret_arp_data->timer) {
+ rte_timer_stop(ret_arp_data->timer);
+ rte_free(ret_arp_data->timer_key);
+ rte_free(ret_arp_data->buf_pkts);
+ ret_arp_data->buf_pkts = NULL;
+ }
+
if (ARPICMP_DEBUG) {
RTE_LOG(INFO, LIBARP,
"ARP Entry Deleted for IP :%d.%d.%d.%d , port %d\n",
if (new_arp_data->status == STALE) {
new_arp_data->status = PROBE;
if (ifm_chk_port_ipv4_enabled
- (new_arp_data->port)) {
+ (new_arp_data->port) != IFM_FAILURE) {
request_arp(new_arp_data->port,
new_arp_data->ip);
} else {
* author:
* Paul Vixie, 1996.
*/
-static int my_inet_pton_ipv6(int af, const char *src, void *dst)
+int my_inet_pton_ipv6(int af, const char *src, void *dst)
{
switch (af) {
case AF_INET:
}
if (ifm_chk_port_ipv4_enabled
- (ret_arp_data->port)) {
+ (ret_arp_data->port) != IFM_FAILURE) {
request_arp(ret_arp_data->port,
ret_arp_data->ip);
} else {