Add automatic LCP creation
Update the pair_config() parser to follow suite. When the configuration 'lcp-auto-subint' is set, and the interface at hand is a subinterface, in lcp_itf_interface_add_del(): - if it's a deletion and we're a sub-int, and we have a LIP: delete it. - if it's a creation and we're a sub-int, and our parent has a LIP, create one. Fix a few logging consistency issues (pair_del), and in pair_delete_by_index() ensure that the right namespace is selected. Due to this quirk with lip->lip_namespace not wanting to be a vec_dup() string, rewrite them all to be strdup/free instead.
This commit is contained in:
@ -164,6 +164,12 @@ lcp_itf_pair_find_by_host (u32 host_sw_if_index)
|
||||
return (lip_db_by_host[host_sw_if_index]);
|
||||
}
|
||||
|
||||
/**
|
||||
* sub-interface auto creation/deletion for LCP
|
||||
*/
|
||||
void lcp_set_auto_subint (u8 is_auto);
|
||||
int lcp_auto_subint (void);
|
||||
|
||||
typedef void (*lcp_itf_pair_add_cb_t) (lcp_itf_pair_t *);
|
||||
typedef void (*lcp_itf_pair_del_cb_t) (lcp_itf_pair_t *);
|
||||
|
||||
|
Reference in New Issue
Block a user