summaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_endpoint.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-07-10 01:14:58 -0700
committerFlorin Coras <florin.coras@gmail.com>2019-07-11 16:08:08 +0000
commit6d1ba56f3303c8bc0b85916aa8762f439923556e (patch)
treeb86dc356ff827031ac352962d051d1700d3f7053 /src/plugins/gbp/gbp_endpoint.c
parent705b29624371ef75f38f914aa955e1b8c168f094 (diff)
gbp: An Endpoint can change sclass
Type: feature Change-Id: I9d3a73a6a6048fa0189f7fa6306a638279977fcd Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_endpoint.c')
-rw-r--r--src/plugins/gbp/gbp_endpoint.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/plugins/gbp/gbp_endpoint.c b/src/plugins/gbp/gbp_endpoint.c
index 836930accbe..611e3444e49 100644
--- a/src/plugins/gbp/gbp_endpoint.c
+++ b/src/plugins/gbp/gbp_endpoint.c
@@ -498,18 +498,12 @@ gbp_endpoint_loc_update (const gbp_endpoint_t * ge,
gbp_endpoint_n_learned (is_learnt - was_learnt);
- if (INDEX_INVALID == gel->gel_epg)
- {
- gel->gel_epg = ggi;
- if (INDEX_INVALID != gel->gel_epg)
- {
- gbp_endpoint_group_lock (gel->gel_epg);
- }
- }
- else
- {
- ASSERT (gel->gel_epg == ggi);
- }
+ /*
+ * update the EPG
+ */
+ gbp_endpoint_group_lock (ggi);
+ gbp_endpoint_group_unlock (gel->gel_epg);
+ gel->gel_epg = ggi;
if (gel->gel_flags & GBP_ENDPOINT_FLAG_REMOTE)
{