confd: allow setting IP address directly on dot1Q bridges

This patch drops a needless restriction of IP addresses on VLAN filtering
bridges from 2024-03-06.  The obvious use-case is when the bridge is an
untagged member of a VLAN and only ony management VLAN is required.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2024-11-27 11:25:21 +01:00
parent bc9c6a4871
commit 963364d4e9
6 changed files with 23 additions and 22 deletions
+11 -4
View File
@@ -219,10 +219,15 @@ admin@example:/config/interface/br0/> set bridge vlans vlan 10 tagged br0
admin@example:/config/interface/br0/> set bridge vlans vlan 20 tagged br0
```
To route or to manage via a VLAN, a VLAN interface needs to be created
on top of the bridge, see section [VLAN Interfaces](#vlan-interfaces)
below for more on this topic.
> [!NOTE]
> To route or to manage via a VLAN, a VLAN interface needs to be created
> on top of the bridge, see section [VLAN Interfaces](#vlan-interfaces)
> below for more on this topic.
> In some use-cases only a single management VLAN on the bridge is used.
> For the example above, if the bridge itself is an untagged member only
> in VLAN 10, IP addresses can be set directly on the bridge without the
> need for dedicated VLAN interfaces on top of the bridge.
#### Multicast Filtering and Snooping
@@ -465,7 +470,9 @@ As conventions, a VLAN interface for VID 20 on top of an Ethernet
interface *eth0* is named *eth0.20*, and a VLAN interface for VID 10 on
top of a bridge interface *br0* is named *vlan10*.
> **Note:** If you name your VLAN interface `foo0.N` or `vlanN`, where `N` is a number, Infix will set the interface type automatically for you.
> [!NOTE]
> If you name your VLAN interface `foo0.N` or `vlanN`, where `N` is a
> number, Infix will set the interface type automatically for you.
### Physical Ethernet Interfaces
+1 -1
View File
@@ -37,7 +37,7 @@ MODULES=(
"ieee802-ethernet-interface@2019-06-21.yang"
"infix-ethernet-interface@2024-02-27.yang"
"infix-factory-default@2023-06-28.yang"
"infix-interfaces@2024-11-15.yang -e vlan-filtering"
"infix-interfaces@2024-11-27.yang -e vlan-filtering"
# from rousette
"ietf-restconf@2017-01-26.yang"
+1 -1
View File
@@ -1,6 +1,6 @@
# -*- sh -*-
# REMEMBER TO UPDATE infix-interfaces ALSO IN confd.inc
MODULES=(
"infix-interfaces@2024-11-15.yang -e vlan-filtering -e containers"
"infix-interfaces@2024-11-27.yang -e vlan-filtering -e containers"
"infix-containers@2024-11-15.yang"
)
+6 -16
View File
@@ -26,6 +26,12 @@ submodule infix-if-bridge {
contact "kernelkit@googlegroups.com";
description "Linux bridge extension for ietf-interfaces.";
revision 2024-11-27 {
description "Drop must() expressions for IP addres on VLAN bridges.
If a bridge is untagged member of a VLAN it should be
possible to set an IP address on the bridge.";
reference "internal";
}
revision 2024-11-15 {
description "Fix pyang linter warnings, drop unused imports.";
reference "internal";
@@ -424,22 +430,6 @@ submodule infix-if-bridge {
}
}
deviation "/if:interfaces/if:interface/ip:ipv4/ip:enabled" {
deviate add {
must "not(.) or count(../../infix-if:bridge/infix-if:vlans/infix-if:vlan) = 0" {
error-message "IPv4 address is not supported on VLAN filtering bridges.";
}
}
}
deviation "/if:interfaces/if:interface/ip:ipv6/ip:enabled" {
deviate add {
must "not(.) or count(../../infix-if:bridge/infix-if:vlans/infix-if:vlan) = 0" {
error-message "IPv6 address is not supported on VLAN filtering bridges.";
}
}
}
augment "/if:interfaces/if:interface/infix-if:port" {
when "derived-from-or-self(if:type,'ianaift:bridge') or "+
"derived-from-or-self(if:type,'ianaift:ethernetCsmacd') or "+
+4
View File
@@ -23,6 +23,10 @@ module infix-interfaces {
contact "kernelkit@googlegroups.com";
description "Linux bridge and lag extensions for ietf-interfaces.";
revision 2024-11-27 {
description "Allow IP addresses directly on VLAN filtering bridges.";
reference "internal";
}
revision 2024-11-15 {
description "Two changes:
- Limit name 1-15 chars, Linux limitation