]> 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>
Tue, 24 Jul 2018 10:17:57 +0000 (12:17 +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 8f39ddd2d5fb9e5d0e2afa1c3003ec15b1daa994..de475d2dcdfcf7cbd1a47229b41db0c84114fd5c 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 */