diff --git a/dp-core/vr_nexthop.c b/dp-core/vr_nexthop.c index 42709c68c..764e729a4 100644 --- a/dp-core/vr_nexthop.c +++ b/dp-core/vr_nexthop.c @@ -53,7 +53,7 @@ vrouter_get_nexthop(unsigned int rid, unsigned int index) router = vrouter_get(rid); nh = __vrouter_get_nexthop(router, index); if (nh) - nh->nh_users++; + (void)__sync_add_and_fetch(&nh->nh_users, 1); return nh; }