From 51cc184d23eb87af8417ded7b58c09c5330955ce Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Mon, 2 Jul 2018 16:50:36 +0200 Subject: [PATCH] bgpd: flush remaining entry if bgp_pbr_match is equal When adding an entry, a check is done in order to flush previously configured entries. The whole parameters are checked so as to not remove some entries that have ipset entries equal, but not iptable settings. Signed-off-by: Philippe Guibert --- bgpd/bgp_pbr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c index e91249bdc3..51c7de645e 100644 --- a/bgpd/bgp_pbr.c +++ b/bgpd/bgp_pbr.c @@ -1285,7 +1285,13 @@ static int bgp_pbr_get_remaining_entry(struct hash_backet *backet, void *arg) bpm_temp = bpme->backpointer; if (bpm_temp->vrf_id != bpm->vrf_id || bpm_temp->type != bpm->type || - bpm_temp->flags != bpm->flags) + bpm_temp->flags != bpm->flags || + bpm_temp->tcp_flags != bpm->tcp_flags || + bpm_temp->tcp_mask_flags != bpm->tcp_mask_flags || + bpm_temp->pkt_len_min != bpm->pkt_len_min || + bpm_temp->pkt_len_max != bpm->pkt_len_max || + bpm_temp->dscp_value != bpm->dscp_value || + bpm_temp->fragment != bpm->fragment) return HASHWALK_CONTINUE; /* look for remaining bpme */ -- 2.39.5