X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Figmp%2Figmp_pkt.c;h=8912e5af882dc0f74a4c2f5017b16fa6cedb21f6;hb=e2fe09742;hp=c2a5d0911c69982f300a556ba754a1db47006504;hpb=b7b929931a07fbb27b43d5cd105f366c3e29807e;p=vpp.git diff --git a/src/plugins/igmp/igmp_pkt.c b/src/plugins/igmp/igmp_pkt.c index c2a5d0911c6..8912e5af882 100644 --- a/src/plugins/igmp/igmp_pkt.c +++ b/src/plugins/igmp/igmp_pkt.c @@ -16,6 +16,7 @@ */ #include +#include static void vlib_buffer_append (vlib_buffer_t * b, uword l) @@ -27,7 +28,6 @@ vlib_buffer_append (vlib_buffer_t * b, uword l) static vlib_buffer_t * igmp_pkt_get_buffer (igmp_pkt_build_t * bk) { - vlib_buffer_free_list_t *fl; vlib_main_t *vm; vlib_buffer_t *b; u32 bi; @@ -38,8 +38,6 @@ igmp_pkt_get_buffer (igmp_pkt_build_t * bk) return (NULL); b = vlib_get_buffer (vm, bi); - fl = vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX); - vlib_buffer_init_for_free_list (b, fl); VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b); b->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED; @@ -79,8 +77,7 @@ igmp_pkt_build_ip_header (igmp_pkt_build_t * bk, ip4->protocol = IP_PROTOCOL_IGMP; ip4->tos = 0xc0; - ip4_src_address_for_packet (&ip4_main.lookup_main, - bk->sw_if_index, &ip4->src_address); + fib_sas4_get (bk->sw_if_index, NULL, &ip4->src_address); vlib_buffer_append (b, sizeof (*ip4)); bk->n_avail -= sizeof (*ip4); @@ -92,8 +89,8 @@ igmp_pkt_build_ip_header (igmp_pkt_build_t * bk, break; case IGMP_MSG_QUERY: if (group != NULL) - clib_memcpy (&ip4->dst_address, &group->key->ip4, - sizeof (ip4_address_t)); + clib_memcpy_fast (&ip4->dst_address, &group->key->ip4, + sizeof (ip4_address_t)); else ip4->dst_address.as_u32 = IGMP_GENERAL_QUERY_ADDRESS; break;