From: Donatas Abraitis Date: Fri, 19 Jul 2019 13:15:52 +0000 (+0300) Subject: bgpd: Convert to network byte order before passing value to `community_del_val` X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=21b729d190597945abc050f081d1aba76d5272a0;p=matthieu%2Ffrr.git 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 --- diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index 837caca41e..81ef03ec58 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -797,6 +797,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); }