+static int
+pg_mac_address_cmp (const mac_address_t * m1, const mac_address_t * m2)
+{
+ return (!mac_address_cmp (m1, m2));
+}
+
+static clib_error_t *
+pg_add_del_mac_address (vnet_hw_interface_t * hi,
+ const u8 * address, u8 is_add)
+{
+ pg_main_t *pg = &pg_main;
+
+ if (ethernet_address_cast (address))
+ {
+ mac_address_t mac;
+ pg_interface_t *pi;
+
+ pi = pool_elt_at_index (pg->interfaces, hi->dev_instance);
+
+ mac_address_from_bytes (&mac, address);
+ if (is_add)
+ vec_add1 (pi->allowed_mcast_macs, mac);
+ else
+ {
+ u32 pos = vec_search_with_function (pi->allowed_mcast_macs, &mac,
+ pg_mac_address_cmp);
+ if (~0 != pos)
+ vec_del1 (pi->allowed_mcast_macs, pos);
+ }
+ }
+ return (NULL);
+}
+