Avoid creating a duplicate LIP
This commit is contained in:
@ -782,6 +782,14 @@ lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name,
|
|||||||
const vnet_sw_interface_t *sw;
|
const vnet_sw_interface_t *sw;
|
||||||
const vnet_hw_interface_t *hw;
|
const vnet_hw_interface_t *hw;
|
||||||
lcp_itf_pair_t *lip;
|
lcp_itf_pair_t *lip;
|
||||||
|
index_t lipi;
|
||||||
|
|
||||||
|
lipi = lcp_itf_pair_find_by_phy (phy_sw_if_index);
|
||||||
|
if (lipi != INDEX_INVALID)
|
||||||
|
{
|
||||||
|
LCP_IF_ERROR ("pair_create: already created");
|
||||||
|
return VNET_API_ERROR_VALUE_EXIST;
|
||||||
|
}
|
||||||
|
|
||||||
if (!vnet_sw_if_index_is_api_valid (phy_sw_if_index))
|
if (!vnet_sw_if_index_is_api_valid (phy_sw_if_index))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user