aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_fib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/l2/l2_fib.c')
-rw-r--r--src/vnet/l2/l2_fib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c
index 57325afa496..160e4e64048 100644
--- a/src/vnet/l2/l2_fib.c
+++ b/src/vnet/l2/l2_fib.c
@@ -1084,7 +1084,10 @@ l2fib_scan (vlib_main_t * vm, f64 start_time, u8 event_only)
key.fields.mac, 6);
mp->mac[evt_idx].action =
l2fib_entry_result_is_set_LRN_MOV (&result) ?
- MAC_EVENT_ACTION_MOVE : MAC_EVENT_ACTION_ADD;
+ (vl_api_mac_event_action_t) MAC_EVENT_ACTION_MOVE
+ : (vl_api_mac_event_action_t) MAC_EVENT_ACTION_ADD;
+ mp->mac[evt_idx].action =
+ htonl (mp->mac[evt_idx].action);
mp->mac[evt_idx].sw_if_index =
htonl (result.fields.sw_if_index);
/* clear event bits and update mac entry */
@@ -1127,7 +1130,9 @@ l2fib_scan (vlib_main_t * vm, f64 start_time, u8 event_only)
/* copy mac entry to event msg */
clib_memcpy_fast (mp->mac[evt_idx].mac_addr, key.fields.mac,
6);
- mp->mac[evt_idx].action = MAC_EVENT_ACTION_DELETE;
+ mp->mac[evt_idx].action =
+ (vl_api_mac_event_action_t) MAC_EVENT_ACTION_DELETE;
+ mp->mac[evt_idx].action = htonl (mp->mac[evt_idx].action);
mp->mac[evt_idx].sw_if_index =
htonl (result.fields.sw_if_index);
evt_idx++;