aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2017-09-20 11:29:17 +0300
committerJohn Lo <loj@cisco.com>2017-09-22 01:55:33 +0000
commitc125eccc10db9c0b9c5d161d3ad20b4fc8c69b26 (patch)
treeaf209e8188ebc6d8ae8719a6307117acd5e41063 /src/vnet/ethernet
parent03add7f5b5e5351790187ea6d7e83803d5be2440 (diff)
IP-MAC,ND:wildcard events,fix sending multiple events
wildcard ND events publisher was sending the last event mutiple times Change-Id: I6c30f2de03fa825e79df9005a3cfaaf68ff7ea2f Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet/ethernet')
-rw-r--r--src/vnet/ethernet/arp.c12
-rw-r--r--src/vnet/ethernet/ethernet.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index 2f3aa6c73ac..e974d2551e5 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -94,6 +94,7 @@ typedef struct
ethernet_proxy_arp_t *proxy_arps;
uword wc_ip4_arp_publisher_node;
+ uword wc_ip4_arp_publisher_et;
} ethernet_arp_main_t;
static ethernet_arp_main_t ethernet_arp_main;
@@ -1536,21 +1537,24 @@ vnet_arp_wc_publish_internal (vnet_main_t * vnm,
{
vlib_main_t *vm = vlib_get_main ();
ethernet_arp_main_t *am = &ethernet_arp_main;
- if (am->wc_ip4_arp_publisher_node == (uword) ~ 0)
+ uword ni = am->wc_ip4_arp_publisher_node;
+ uword et = am->wc_ip4_arp_publisher_et;
+
+ if (ni == (uword) ~ 0)
return;
wc_arp_report_t *r =
- vlib_process_signal_event_data (vm, am->wc_ip4_arp_publisher_node, 1, 1,
- sizeof *r);
+ vlib_process_signal_event_data (vm, ni, et, 1, sizeof *r);
r->ip4 = args->a.ip4.as_u32;
r->sw_if_index = args->sw_if_index;
memcpy (r->mac, args->a.ethernet, sizeof r->mac);
}
void
-wc_arp_set_publisher_node (uword node_index)
+wc_arp_set_publisher_node (uword node_index, uword event_type)
{
ethernet_arp_main_t *am = &ethernet_arp_main;
am->wc_ip4_arp_publisher_node = node_index;
+ am->wc_ip4_arp_publisher_et = event_type;
}
/*
diff --git a/src/vnet/ethernet/ethernet.h b/src/vnet/ethernet/ethernet.h
index 1a9e9790869..a6846b13ffc 100644
--- a/src/vnet/ethernet/ethernet.h
+++ b/src/vnet/ethernet/ethernet.h
@@ -543,7 +543,7 @@ int vnet_add_del_ip4_arp_change_event (vnet_main_t * vnm,
uword type_opaque,
uword data, int is_add);
-void wc_arp_set_publisher_node (uword inode_index);
+void wc_arp_set_publisher_node (uword inode_index, uword event_type);
void ethernet_arp_change_mac (u32 sw_if_index);
void ethernet_ndp_change_mac (u32 sw_if_index);