diff --git a/src/bbl_ctx.c b/src/bbl_ctx.c index 01f5c6d4..b2dedb3c 100644 --- a/src/bbl_ctx.c +++ b/src/bbl_ctx.c @@ -77,6 +77,7 @@ bbl_ctx_add (void) CIRCLEQ_INIT(&ctx->interface_qhead); ctx->flow_id = 1; + ctx->multicast_traffic = true; /* Initialize hash table dictionaries. */ ctx->vlan_session_dict = hashtable_dict_new((dict_compare_func)bbl_compare_key64, bbl_key64_hash, BBL_SESSION_HASHTABLE_SIZE); diff --git a/src/bbl_tx.c b/src/bbl_tx.c index fcc64630..bb694e6e 100644 --- a/src/bbl_tx.c +++ b/src/bbl_tx.c @@ -1778,7 +1778,7 @@ bbl_tx(bbl_ctx_s *ctx, bbl_interface_s *interface, uint8_t *buf, uint16_t *len) return PROTOCOL_SUCCESS; } /* Write Multicast frames. */ - if(ctx->config.send_multicast_traffic && ctx->config.igmp_group_count && ctx->multicast_traffic ) { + if(ctx->config.send_multicast_traffic && ctx->config.igmp_group_count && ctx->multicast_traffic) { if(interface->mc_packet_cursor < ctx->config.igmp_group_count) { memcpy(buf, interface->mc_packets + (interface->mc_packet_cursor*interface->mc_packet_len), interface->mc_packet_len); *(uint64_t*)(buf + (interface->mc_packet_len - 16)) = interface->mc_packet_seq; @@ -1786,10 +1786,11 @@ bbl_tx(bbl_ctx_s *ctx, bbl_interface_s *interface, uint8_t *buf, uint16_t *len) *(uint32_t*)(buf + (interface->mc_packet_len - 4)) = interface->tx_timestamp.tv_nsec; *len = interface->mc_packet_len; interface->mc_packet_cursor++; + interface->stats.mc_tx++; return PROTOCOL_SUCCESS; } else { /* This must be the last send operation in this function to fill up remaining slots - * with multicast traffic but all other types of traffic have priority. */ + * with multicast traffic but all other types of traffic have priority. */ interface->mc_packet_cursor = 0; interface->mc_packet_seq++; }