summaryrefslogtreecommitdiff
path: root/interface-definitions/include/static
diff options
context:
space:
mode:
authorRuben Herold <ruben@puettmann.net>2026-10-29 15:22:24 +0100
committerChristian Breunig <christian@breunig.cc>2026-11-01 19:58:49 +0100
commit39507a51f9ec0b22796d1ddb591812fc4c6ac903 (patch)
tree29a2fe824b37287fdef3e4c80abccf5665e70905 /interface-definitions/include/static
parent1005b1ca772a40d2937e7add9707656802cc8a1a (diff)
downloadvyos-1x-39507a51f9ec0b22796d1ddb591812fc4c6ac903.tar.gz
vyos-1x-39507a51f9ec0b22796d1ddb591812fc4c6ac903.zip
static: T9482: handle a blackhole next to a next-hop of the same distance
FRR staticd refuses a blackhole or reject route next to a next-hop or interface route of the same prefix and distance. VyOS accepted the combination, the commit failed later in frr-reload and on some FRR versions the config manager stalled. Add a disable node to blackhole and reject. Verification refuses an enabled blackhole or reject route next to a next-hop, interface or dhcp-interface route of the same distance, and blackhole together with reject, in routes, tables and VRFs. The same applies to the default route of a PPPoE interface and of a DHCP interface that has a gateway. A commit that changes only such an interface does not run the check, frr-reload refuses it and the commit is rolled back. A config migration sets disable on the route FRR did not apply, so existing configurations keep loading and route as before.
Diffstat (limited to 'interface-definitions/include/static')
-rw-r--r--interface-definitions/include/static/static-route-blackhole.xml.i3
-rw-r--r--interface-definitions/include/static/static-route-distance-default.xml.i6
-rw-r--r--interface-definitions/include/static/static-route-reject.xml.i3
-rw-r--r--interface-definitions/include/static/static-route.xml.i4
-rw-r--r--interface-definitions/include/static/static-route6.xml.i4
5 files changed, 14 insertions, 6 deletions
diff --git a/interface-definitions/include/static/static-route-blackhole.xml.i b/interface-definitions/include/static/static-route-blackhole.xml.i
index 487f775f5..c926b0f32 100644
--- a/interface-definitions/include/static/static-route-blackhole.xml.i
+++ b/interface-definitions/include/static/static-route-blackhole.xml.i
@@ -4,7 +4,8 @@
<help>Silently discard pkts when matched</help>
</properties>
<children>
- #include <include/static/static-route-distance.xml.i>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static/static-route-distance-default.xml.i>
#include <include/static/static-route-tag.xml.i>
</children>
</node>
diff --git a/interface-definitions/include/static/static-route-distance-default.xml.i b/interface-definitions/include/static/static-route-distance-default.xml.i
new file mode 100644
index 000000000..b74b684bb
--- /dev/null
+++ b/interface-definitions/include/static/static-route-distance-default.xml.i
@@ -0,0 +1,6 @@
+<!-- include start from static/static-route-distance-default.xml.i -->
+#include <include/static/static-route-distance.xml.i>
+<leafNode name="distance">
+ <defaultValue>1</defaultValue>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/static/static-route-reject.xml.i b/interface-definitions/include/static/static-route-reject.xml.i
index ef713ac85..a04dce3d2 100644
--- a/interface-definitions/include/static/static-route-reject.xml.i
+++ b/interface-definitions/include/static/static-route-reject.xml.i
@@ -4,7 +4,8 @@
<help>Emit an ICMP unreachable when matched</help>
</properties>
<children>
- #include <include/static/static-route-distance.xml.i>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static/static-route-distance-default.xml.i>
#include <include/static/static-route-tag.xml.i>
</children>
</node>
diff --git a/interface-definitions/include/static/static-route.xml.i b/interface-definitions/include/static/static-route.xml.i
index 59742dd3b..8a2a38e59 100644
--- a/interface-definitions/include/static/static-route.xml.i
+++ b/interface-definitions/include/static/static-route.xml.i
@@ -31,7 +31,7 @@
</properties>
<children>
#include <include/generic-disable-node.xml.i>
- #include <include/static/static-route-distance.xml.i>
+ #include <include/static/static-route-distance-default.xml.i>
#include <include/static/static-route-segments.xml.i>
#include <include/static/static-route-vrf.xml.i>
</children>
@@ -49,7 +49,7 @@
</properties>
<children>
#include <include/generic-disable-node.xml.i>
- #include <include/static/static-route-distance.xml.i>
+ #include <include/static/static-route-distance-default.xml.i>
#include <include/generic-interface.xml.i>
#include <include/static/static-route-segments.xml.i>
#include <include/static/static-route-vrf.xml.i>
diff --git a/interface-definitions/include/static/static-route6.xml.i b/interface-definitions/include/static/static-route6.xml.i
index a3d972d39..0bbd1aca2 100644
--- a/interface-definitions/include/static/static-route6.xml.i
+++ b/interface-definitions/include/static/static-route6.xml.i
@@ -30,7 +30,7 @@
</properties>
<children>
#include <include/generic-disable-node.xml.i>
- #include <include/static/static-route-distance.xml.i>
+ #include <include/static/static-route-distance-default.xml.i>
#include <include/static/static-route-segments.xml.i>
#include <include/static/static-route-vrf.xml.i>
</children>
@@ -48,7 +48,7 @@
</properties>
<children>
#include <include/generic-disable-node.xml.i>
- #include <include/static/static-route-distance.xml.i>
+ #include <include/static/static-route-distance-default.xml.i>
#include <include/generic-interface.xml.i>
#include <include/static/static-route-segments.xml.i>
#include <include/static/static-route-vrf.xml.i>