From 21b729d190597945abc050f081d1aba76d5272a0 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Fri, 19 Jul 2019 16:15:52 +0300 Subject: [PATCH] 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 --- bgpd/bgp_clist.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.39.5