This patch adds information about a vlan filtering bridge to the
operational datastore.
The information included is vlans, pvid and stp-state. These changes
reflects what can be configured though confd.
NOTE: pvid is still missing for bridge interfaces. Discussions on how
to best add this is ongoing. It's currently not configurable due to an
existing self check in the infix-if-bridge yang model.
Signed-off-by: Richard Alpe <richard@bit42.se>
This can now a days be inferred and isn't needed. Also, the interface
type in virtual testing is now etherlike not ethernet.
Signed-off-by: Richard Alpe <richard@bit42.se>
This resolves the regression where configured etherlike interface mac
addresses where not deleted from the system.
Signed-off-by: Richard Alpe <richard@bit42.se>
* Remove bogus ethernet statistics for br0
* Change parentbus for e0 and e1 to make them ethernet devices (not
virtio -> etherlike).
Signed-off-by: Richard Alpe <richard@bit42.se>
Instead of "ethernet". Prior to this patch virtio interfaces where
identified as "ethernet", which resulted in /run/net trying to enable
autoneg on them. Which isn't supported and resulted in an ABANDONED
"default config".
Signed-off-by: Richard Alpe <richard@bit42.se>
Needed for devices that share a lot of properties with an ethernet
device but doesn't support "ethtool" and such. An example is TAP
interfaces.
Signed-off-by: Richard Alpe <richard@bit42.se>
Rely on the interface diff to figure out if any autoneg related config
has changed; if so, generate the resulting configuration based on the
current interface config.
- Remove loopback check, the model only allows ethernet config on
interfaces of type "ethernet".
- Split up the input validation of speed/duplex to give the user an
error message with as much specificity as possible.
- Validate that the configured speed/duplex is supported.
- Move the generated script to execute earlier to avoid unnecessary
link flapping.
- Use negative POSIX error codes, these are (or at least should be)
mapped to sysrepo errors in netdag_gen_iface.
Add the ability to configure interface speed, duplex and autoneg.
Initially this was pared with YANG model deviations that restricted
explicit interface speed and duplex when autoneg was enabled. But due
to conflicting default states in YANG, this code was dropped.
Signed-off-by: Richard Alpe <richard@bit42.se>
The Infix scan token we have is only valid for KernelKit, so for any
downstream forks we must not attempt to run this workflow.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The DHCP client YANG model saw a lot of changes added in the 23.12
sprint, fortunately there was never an official release.
This commit bumps the model version for v24.01.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This should be the last outstanding issue to fix#278. Please note,
it is undefined what happens if you have two DHCP clients that request
hostname, and changing hostname from NETCONF at runtime will overwrite
any hostname set by the DHCP client.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
For maximum flexibility we allow the user to full control over the DHCP
options the client requests. For this to work we must tell udhcpc to
not set any of its defaults behind the scenes, so we call it with '-o'.
This commit adds support for inferring these udhcpc default options in
NETCONF. So when enabling the DHCP client we now get the same set of
sane options as udhcpc otherwise hides from us.
Fixes#278, at least wrt. the lack of sent options. Allowing the client
script to set the hostname will be added in a later commit.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
No need to guard the hostname option in quotes, it must not contain
whitespace. If user configured more than one word, use first.
Fixes#283
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>