diff options
Diffstat (limited to 'vnet/vnet/classify/input_acl.c')
-rw-r--r-- | vnet/vnet/classify/input_acl.c | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/vnet/vnet/classify/input_acl.c b/vnet/vnet/classify/input_acl.c index ddb4332767a..c446f2d687c 100644 --- a/vnet/vnet/classify/input_acl.c +++ b/vnet/vnet/classify/input_acl.c @@ -33,34 +33,24 @@ vnet_inacl_ip_feature_enable (vlib_main_t * vnm, } else { /* IP[46] */ - ip_lookup_main_t * lm; - vnet_feature_config_main_t * ipcm; - u32 ftype; - u32 ci; + vnet_feature_config_main_t *fcm; + u8 arc; if (tid == INPUT_ACL_TABLE_IP4) - { - lm = &ip4_main.lookup_main; - ftype = ip4_main.ip4_unicast_rx_feature_check_access; - } + { + vnet_feature_enable_disable ("ip4-unicast", "ip4-inacl", + sw_if_index, feature_enable, 0, 0); + arc = vnet_get_feature_arc_index ("ip4-unicast"); + } else - { - lm = &ip6_main.lookup_main; - ftype = ip6_main.ip6_unicast_rx_feature_check_access; - } - - ipcm = &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT]; - - ci = ipcm->config_index_by_sw_if_index[sw_if_index]; - ci = ((feature_enable) - ? vnet_config_add_feature - : vnet_config_del_feature) - (vnm, &ipcm->config_main, ci, ftype, - /* config data */ 0, - /* # bytes of config data */ 0); - - ipcm->config_index_by_sw_if_index[sw_if_index] = ci; - am->vnet_config_main[tid] = &ipcm->config_main; + { + vnet_feature_enable_disable ("ip6-unicast", "ip6-inacl", + sw_if_index, feature_enable, 0, 0); + arc = vnet_get_feature_arc_index ("ip6-unicast"); + } + + fcm = vnet_get_feature_arc_config_main (arc); + am->vnet_config_main[tid] = &fcm->config_main; } return 0; |