| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Follow-up for 17c5337f7b2993619d84acc2088b2ba1789e6477.
Older kernels (older than v6.5) refuse RTM_NEWLINK messages with IFLA_ADDRESS
attribute when the netdev already exists and is running, even if the MAC
address is unchanged.
So, let's not set IFLA_ADDRESS or IFLA_MTU if they are unchanged, and
set the attributes only when we can update them.
|
|
|
|
| |
Otherwise, the kernel older than v6.2 will refuse the netlink message.
|
|
|
|
|
|
|
| |
If a tunnel or vxlan is configured with Local=dhcp4 or so, then the
local address needs to be changed when it is changed.
Fixes #24854.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Then, when a .netdev file of a stacked netdev is modified, the netdev
can be reconfigured with the updated setting by something like the
following way:
```
ip link del vlan99
networkctl reload
```
Note, removing the vlan interface in the above example may not be necessary,
e.g. when only VLAN flags, egress mapping, or ingress mapping are updated.
But, it is necessary when VLAN ID is updated.
Closes #9627.
Closes #27177.
Closes #34907.
Replaces #22557.
|
|
|
|
|
| |
Some netdev configs can be modified after the interface is created.
Let's allow to reconfigure existing interfaces.
|
|
|
|
|
|
| |
to netdev_load()
No functional change, preparation for later commits.
|
|\
| |
| | |
split-out of #34909.
|
| |
| |
| |
| |
| | |
The 6rd SIT tunnel configuration can be updated without recreating the
interface. Let's reuse existing tunnel.
|
| |
| |
| |
| |
| |
| |
| | |
dhcp4_pd_create_6rd_tunnel()
No functional change, just refactoring and preparation for later
commits.
|
|\ \
| | |
| | |
| | |
| | | |
already exists (#34937)
split-out of #34909.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Also, though currently not supported by networkd,
IFLA_MACSEC_CIPHER_SUITE, IFLA_MACSEC_ICV_LEN, IFLA_MACSEC_SCI
cannot be updated.
|
| | |
| | |
| | |
| | |
| | | |
Currently, netdev->ifindex is always zero when this function is called.
So, this does not change any behavior. Preparation for later commits.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Several netdevs cannot set IFLA_ADDRESS or IFLA_MTU attribute on update.
Currently, the vtable field is unused, as we do not support updating
existing netdevs. Preparation for later commits.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- network_load() is always called with an empty OrderedHashmap, renamed the output
parameter to 'ret'.
- When netdev_load() is called on startup, the hashmap is NULL. When it is
called on reloading, the hashmap is not cleaned up.
Hence, then these cleanups are always no-op. Let's drop them.
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
It seems there is no restriction for local and remote addresses.
Fixes #34930.
|
| |
| |
| |
| |
| |
| |
| |
| | |
interface index is specified
If an ifindex is specified, we are modifying the existing interface.
Hence, these flags should not be set. Otherwise, the request will be
refused with -EEXIST.
|
| |
| |
| |
| |
| |
| | |
No functional change, as currently networkd detaches NetDev objects only
on stop (or invalid .netdev file is loaded).
Preparation for later commits.
|
|/
|
|
| |
No functional change, preparation for later commits.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Follow-up for fa724cd52c1335d6b3225b74c1a9c801389997ba
We attempt to retrieve default key if eqzero(Wireguard.private_key),
but a all zero default key should be refused too.
|
|
|
|
|
| |
Then, the Link object for the peer interface can have a reference to the
corresponding NetDev object.
|
| |
|
|
|
|
|
| |
Then, Link object for an L2TP session can have reference to the
corresponding NetDev object.
|
| |
|
|
|
|
| |
Also, use log_section_warning_errno() where applicable.
|
|
|
|
|
| |
Then, the Link object for the peer interface can have a reference to the
corresponding NetDev object.
|
| |
|
|
|
|
|
|
| |
netdev vtable
Currently no vtable sets these functions, but will be used later.
|
|
|
|
|
| |
No functional change, just refactoring and preparation for later
commits.
|
|
|
|
|
|
|
| |
netdev_load_one()
No functional change, just refactoring and preparation for later
commits.
|
|
|
|
|
|
|
|
|
| |
Then, it is not necessary to free NetDev.ifname when a conflicting
.netdev file is already loaded.
This also split out netdev_detach_name() and netdev_detach_impl().
No functional change, just refactoring.
|
|
|
|
|
|
| |
This also makes netdev_enter_failed() called on caller side.
No functional change, just refactoring.
|
|
|
|
|
| |
For safety. No functional change, just refactoring and preparation for
later commits.
|
|
|
|
|
|
|
| |
to Link
Even when a NetDev object with the same name found, its iftype or kind
may be different. For safety, let's also check them.
|
| |
|
|
|
|
|
| |
This makes the macros use log_syntax_parse_error(), hopefully which provides
more informative log message in general, and reduces binary size.
|
|
|
|
|
| |
The function is generic enough. Currently it is used at only one place.
But it will be used at another place.
|
|
|
|
| |
Addresses https://github.com/systemd/systemd/pull/34013#discussion_r1719890231.
|
|
|
|
|
|
| |
Similar to PresharedKeyFile=, but for public key.
Closes #34012.
|
|
|
|
| |
Allows to configure the lowest value of the UDP tunnel source port range.
|
|
|
|
|
|
|
|
| |
As all callers do not care if the address has peer address.
This also drops prefixlen argument as it is always zero.
Fixes a bug introduced by 42f8b6a80878e688b821adfb315c0a1f0a7076ce.
Fixes #31950.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Linux commit ddd1ad68826d ("net: bridge: Add netlink knobs for number
/ max learned FDB entries") [1] it is possible to limit to number of
dynamically learned fdb entries per bridge.
Add support to the systemd netdev bridge for the new netlink attribute
IFLA_BR_FDB_MAX_LEARNED.
[1] https://lore.kernel.org/all/20231016-fdb_limit-v5-0-32cddff87758@avm.de/
Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- drop unnecessary SYNTHETIC_ERRNO() when the logger does not propagate
error code,
- drop unnecessary '%m' in error message when the error code is
specified with SYNTHETIC_ERRNO(),
- add missing full stop at the end of log message,
- use RET_GATHER(),
- add missing ", ignoring.",
- upeercase the first letter, etc., etc...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The linux/ headers include linux/libc-compat.h that makes sure the
linux/ headers won't redeclare symbols already declared by net/if.h, but
glibc's net/if.h doesn't do that, so if the include order is reversed
we'll end up with a bunch of errors about redeclared stuff:
[3/519] Compiling C object test-network-tables.p/src_network_test-network-tables.c.o
FAILED: test-network-tables.p/src_network_test-network-tables.c.o
cc -Itest-network-tables.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -Isrc/libsystemd-network -I../src/libsystemd-network -Isrc/network -I../src/network -I../src/network/netdev -I../src/network/tc -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -DTEST_CODE=1 -MD -MQ test-network-tables.p/src_network_test-network-tables.c.o -MF test-network-tables.p/src_network_test-network-tables.c.o.d -o test-network-tables.p/src_network_test-network-tables.c.o -c ../src/network/test-network-tables.c
In file included from ../src/basic/linux/if_bonding.h:47,
from ../src/network/netdev/bond.h:5,
from ../src/network/test-network-tables.c:3:
../src/basic/linux/if.h:111:41: error: redeclaration of enumerator ‘IFF_UP’
111 | #define IFF_UP IFF_UP
| ^~~~~~
../src/basic/linux/if.h:84:9: note: previous definition of ‘IFF_UP’ with type ‘enum net_device_flags’
84 | IFF_UP = 1<<0, /* sysfs */
| ^~~~~~
../src/basic/linux/if.h:112:41: error: redeclaration of enumerator ‘IFF_BROADCAST’
112 | #define IFF_BROADCAST IFF_BROADCAST
| ^~~~~~~~~~~~~
...
This also drops remaining workarounds from the last time this issue was
brought up (6f270e6bd8) since they shouldn't be needed anymore if the
order of the includes is the "correct" one. I also added a comment to
each affected include when this is inevitably encountered again in the
future.
Resolves: #32160
|