plist: Add safety check to avoid going over 4294967295 for prefix-list

This commit is contained in:
Donatas Abraitis 2018-08-31 16:38:56 +03:00
parent 7e678379ed
commit fbc7ead79c

View File

@ -396,7 +396,7 @@ static int64_t prefix_new_seq_get(struct prefix_list *plist)
newseq = ((maxseq / 5) * 5) + 5;
return newseq;
return (newseq > UINT_MAX) ? UINT_MAX : newseq;
}
/* Return prefix list entry which has same seq number. */