diff options
author | Eyal Bari <ebari@cisco.com> | 2017-09-20 11:29:17 +0300 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2017-09-22 01:55:33 +0000 |
commit | c125eccc10db9c0b9c5d161d3ad20b4fc8c69b26 (patch) | |
tree | af209e8188ebc6d8ae8719a6307117acd5e41063 /src/vnet/ethernet/arp.c | |
parent | 03add7f5b5e5351790187ea6d7e83803d5be2440 (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/arp.c')
-rw-r--r-- | src/vnet/ethernet/arp.c | 12 |
1 files changed, 8 insertions, 4 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 = ðernet_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 = ðernet_arp_main; am->wc_ip4_arp_publisher_node = node_index; + am->wc_ip4_arp_publisher_et = event_type; } /* |