bgpd: Convert to network byte order before passing value to community_del_val

community_val_get() returns ntohl(val) which is used in more places like
community_include(), community_add_val(), but community_del_val() is missing
back conversion htonl().

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
Donatas Abraitis 2019-07-19 16:15:52 +03:00
parent 60762f8f19
commit 0743b61d60

View File

@ -823,6 +823,7 @@ struct community *community_list_match_delete(struct community *com,
/* Delete all of the communities we flagged for deletion */
for (i = delete_index - 1; i >= 0; i--) {
val = community_val_get(com, com_index_to_delete[i]);
val = htonl(val);
community_del_val(com, &val);
}