diff options
author | Stanislav Zaikin <zstaseg@gmail.com> | 2023-02-02 09:54:17 +0100 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2023-02-02 16:43:33 +0000 |
commit | 9b02f72fedfdce4dbd64539cb41870347eb67d1d (patch) | |
tree | ca0ee8edae1a04f71762f9633961b96a18272b7e /src/plugins/linux-cp/lcp_router.c | |
parent | 051d3a3f60d4a0bbbffd099f21d2fd914957b9a3 (diff) |
linux-cp: fix auto-sub-int
lcp_itf_pair_pool could grew during sub-interface creation.
Type: fix
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
Change-Id: Ideafe392f9bb2b418ce9d6faa4f08dfe26f4a273
Diffstat (limited to 'src/plugins/linux-cp/lcp_router.c')
-rw-r--r-- | src/plugins/linux-cp/lcp_router.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/linux-cp/lcp_router.c b/src/plugins/linux-cp/lcp_router.c index ab8ab164972..01eca9f2011 100644 --- a/src/plugins/linux-cp/lcp_router.c +++ b/src/plugins/linux-cp/lcp_router.c @@ -419,6 +419,10 @@ lcp_router_link_add (struct rtnl_link *rl, void *ctx) lip->lip_phy_sw_if_index); return; } + + /* pool could grow during the previous operation */ + lip = lcp_itf_pair_get (lipi); + /* create the vlan interface on the parent host */ if (vnet_create_sub_interface (lip->lip_host_sw_if_index, vlan, 18, 0, vlan, &sub_host_sw_if_index)) |