- rv = gbp_contract_update (ntohs (mp->contract.src_epg),
- ntohs (mp->contract.dst_epg),
- ntohl (mp->contract.acl_index), rules);
+ allowed_ethertypes = NULL;
+
+ /*
+ * allowed ether types
+ */
+ n_et = mp->contract.n_ether_types;
+ vec_validate (allowed_ethertypes, n_et - 1);
+
+ for (ii = 0; ii < n_et; ii++)
+ {
+ /* leave the ether types in network order */
+ allowed_ethertypes[ii] = mp->contract.allowed_ethertypes[ii];
+ }
+
+ rv = gbp_contract_update (ntohs (mp->contract.scope),
+ ntohs (mp->contract.sclass),
+ ntohs (mp->contract.dclass),
+ ntohl (mp->contract.acl_index),
+ rules, allowed_ethertypes, &stats_index);