Project

General

Profile

Bug #11686 ยป acceptfilter.txt

Marcos M, 02/08/2022 04:00 PM

 
1
diff --git a/net/pfSense-pkg-frr/files/usr/local/pkg/frr/inc/frr_zebra.inc b/net/pfSense-pkg-frr/files/usr/local/pkg/frr/inc/frr_zebra.inc
2
index ea07597c31bf32173ba5fc518bc0d13adae82f4a..13791f68cab00e246b6af9e85b83e6c850146b40 100644
3
--- a/net/pfSense-pkg-frr/files/usr/local/pkg/frr/inc/frr_zebra.inc
4
+++ b/net/pfSense-pkg-frr/files/usr/local/pkg/frr/inc/frr_zebra.inc
5
@@ -698,6 +698,7 @@ function frr_zebra_generate_staticroutes() {
6
 /* Generate a convenience list of accept filters */
7
 function frr_zebra_generate_acceptfilters() {
8
 	global $config, $frr_config_base;
9
+	$seq = 10;
10
 
11
 	/* Check OSPF Interfaces for automatic accept filters */
12
 	if (is_array($config['installedpackages']['frrospfdinterfaces']['config'])) {
13
@@ -708,15 +709,16 @@ function frr_zebra_generate_acceptfilters() {
14
 			}
15
 			if (!empty($conf['acceptfilter']) && is_ipaddrv4($subnet) && is_numericint($interface_subnet)) {
16
 				$noaccept = $noaccept ?: "";
17
-				$noaccept .= "ip prefix-list ACCEPTFILTER deny {$subnet}/{$interface_subnet}\n";
18
-				$noaccept .= "ip prefix-list ACCEPTFILTER deny {$interface_ip}/32\n";
19
+				$noaccept .= "ip prefix-list ACCEPTFILTER seq {$seq} deny {$subnet}/{$interface_subnet}\n";
20
+				$seq += 10;
21
+				$noaccept .= "ip prefix-list ACCEPTFILTER seq {$seq} deny {$interface_ip}/32\n";
22
+				$seq += 10;
23
 			}
24
 		}
25
 	}
26
 
27
 	/* Check FRR configuration network list for accept filter entries */
28
 	if (is_array($config['installedpackages']['frr']['config'][0]['row'])) {
29
-		$seq = 10;
30
 		foreach ($config['installedpackages']['frr']['config'][0]['row'] as $redistr) {
31
 			if (isset($redistr['acceptfilter'])) {
32
 				$noaccept = $noaccept ?: "";
    (1-1/1)