diff options
author | Neale Ranns <nranns@cisco.com> | 2019-11-06 11:17:54 +0000 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-11-14 12:24:58 +0000 |
commit | 320dfcf2aa8f4617b51a2bb15f3d0f93ee62d4dc (patch) | |
tree | a636ed738009ce52113b78da98323affe837231c /src/vnet/fib/fib_types.h | |
parent | e16707b5b2195fda47c1a3db7ba61f30055d2dbc (diff) |
fib: Copy the prefix before use in case the underlying entry reallocs.
Type: fix
all other uses of the fib_entry_get_preifx in the code base don't pass
the prefix into recursive functions.
Change-Id: Ic1c56acd406a733b215ee2fd98b6bed58b490a4f
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_types.h')
-rw-r--r-- | src/vnet/fib/fib_types.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_types.h b/src/vnet/fib/fib_types.h index 91d1d7b2fde..11e5bf4ebae 100644 --- a/src/vnet/fib/fib_types.h +++ b/src/vnet/fib/fib_types.h @@ -248,6 +248,12 @@ extern int fib_prefix_cmp(const fib_prefix_t *p1, const fib_prefix_t *p2); /** + * \brief Copy a prefix + */ +extern void fib_prefix_copy(fib_prefix_t *dst, + const fib_prefix_t *src); + +/** * \brief Compare two prefixes for covering relationship * * \return non-zero if the first prefix is a cover for the second |