diff options
author | 2016-03-15 10:21:54 +0100 | |
---|---|---|
committer | 2016-03-18 12:59:51 +0100 | |
commit | dbf19ca7f9b93a843503f9204afd0815f3ef8332 (patch) | |
tree | 61c37d487be23bbc98a3e8e7d5733231cded4149 /vnet/vnet/ip/ip6_forward.c | |
parent | 4ea4ecdda9dbc01f9776b63d3a91397b34e46f13 (diff) |
Make adjacencies shareable
Change-Id: I620871ca715b751d2e487f37341b7118797c9176
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet/vnet/ip/ip6_forward.c')
-rw-r--r-- | vnet/vnet/ip/ip6_forward.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vnet/vnet/ip/ip6_forward.c b/vnet/vnet/ip/ip6_forward.c index fd6874d4def..1d0e21e528c 100644 --- a/vnet/vnet/ip/ip6_forward.c +++ b/vnet/vnet/ip/ip6_forward.c @@ -265,6 +265,14 @@ void ip6_add_del_route (ip6_main_t * im, ip6_add_del_route_args_t * a) BV(clib_bihash_add_del) (&im->ip6_lookup_table, &kv, 1 /* is_add */); } + /* Avoid spurious reference count increments */ + if (old_adj_index == adj_index) + { + ip_adjacency_t * adj = ip_get_adjacency (lm, adj_index); + if (adj->share_count > 0) + adj->share_count --; + } + /* Delete old adjacency index if present and changed. */ { if (! (a->flags & IP6_ROUTE_FLAG_KEEP_OLD_ADJACENCY) |