X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fgbp%2Fgbp_endpoint.c;fp=src%2Fplugins%2Fgbp%2Fgbp_endpoint.c;h=611e3444e496e366903ec9cfc122f2944497bb7a;hb=6d1ba56f3303c8bc0b85916aa8762f439923556e;hp=836930accbeb6b68595248df18586e7ac5eca8c4;hpb=705b29624371ef75f38f914aa955e1b8c168f094;p=vpp.git 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) {