diff options
Diffstat (limited to 'src/vnet/adj/adj_mcast.c')
-rw-r--r-- | src/vnet/adj/adj_mcast.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vnet/adj/adj_mcast.c b/src/vnet/adj/adj_mcast.c index a3ba4d6ab18..4f678e43e80 100644 --- a/src/vnet/adj/adj_mcast.c +++ b/src/vnet/adj/adj_mcast.c @@ -100,7 +100,9 @@ adj_mcast_add_or_lock (fib_protocol_t proto, */ void adj_mcast_update_rewrite (adj_index_t adj_index, - u8 *rewrite) + u8 *rewrite, + u8 offset, + u32 mask) { ip_adjacency_t *adj; @@ -118,6 +120,13 @@ adj_mcast_update_rewrite (adj_index_t adj_index, vnet_get_main(), adj->rewrite_header.sw_if_index), rewrite); + /* + * set the fields corresponding to the mcast IP address rewrite + * The mask must be stored in network byte order, since the packet's + * IP address will also be in network order. + */ + adj->rewrite_header.dst_mcast_offset = offset; + adj->rewrite_header.dst_mcast_mask = clib_host_to_net_u32(mask); } void |