mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-01 13:23:01 +02:00
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:
+11
-4
@@ -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
|
||||
|
||||
@@ -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,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"
|
||||
)
|
||||
|
||||
@@ -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 "+
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user