]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: flush remaining entry if bgp_pbr_match is equal
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 2 Jul 2018 14:50:36 +0000 (16:50 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 20 Aug 2018 16:33:38 +0000 (18:33 +0200)
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 <philippe.guibert@6wind.com>
bgpd/bgp_pbr.c

index e91249bdc38de69d238c9f4f69bfd34d56a4fd20..51c7de645e2bb387a1a670ea6cb97d6c1a4cb792 100644 (file)
@@ -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 */