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:
1
lcpng.h
1
lcpng.h
@ -24,6 +24,7 @@ typedef struct lcp_main_s
|
||||
u16 msg_id_base; /* API message ID base */
|
||||
u8 default_namespace[LCP_NS_LEN]; /* default namespace if set */
|
||||
int default_ns_fd;
|
||||
u8 auto_subint; /* Automatically create/delete LCP sub-interfaces */
|
||||
/* Set when Unit testing */
|
||||
u8 test_mode;
|
||||
} lcp_main_t;
|
||||
|
Reference in New Issue
Block a user