routing: add missed RIB_WUNLOCK in the add_route_flags().

MFC after:	2 weeks
This commit is contained in:
Alexander V. Chernikov 2022-12-30 15:54:06 +00:00
parent 1522062bad
commit 06e879593a

View File

@ -793,6 +793,7 @@ add_route_flags(struct rib_head *rnh, struct rtentry *rt, struct route_nhop_data
if (op_flags & RTM_F_REPLACE) {
if (nhop_get_prio(rnd_orig.rnd_nhop) > nhop_get_prio(rnd_add->rnd_nhop)) {
/* Old path is "better" (e.g. has PINNED flag set) */
RIB_WUNLOCK(rnh);
error = EEXIST;
goto out;
}