Commit Graph
100 Commits
Author SHA1 Message Date
Yu Watanabe d1dfedcf85 test: addresses shell check warning
This fixes the following warning:
-----
In /github/workspace/test/units/testsuite-62.sh line 39:
KERNEL_MINOR="${KERNEL_VERSION#$KERNEL_MAJOR.}"
                               ^-----------^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean:
KERNEL_MINOR="${KERNEL_VERSION#"$KERNEL_MAJOR".}"
2021-12-10 20:07:38 +09:00
Yu Watanabe 85445fba22 test: skip TEST-62 if bpf-framework is not supported
Fixes #21718.
2021-12-10 19:54:33 +09:00
Yu Watanabe 6b35ed80ed build: include BPF_FRAMEWORK tag in version string 2021-12-10 19:54:33 +09:00
Yu Watanabe 77a34a3751 meson: use subdir_done() to reduce indent 2021-12-10 19:54:33 +09:00
Yu Watanabe ee1eecfe4d man: fix typo 2021-12-10 07:27:43 +01:00
Yu Watanabe b55093ce88 network: dhcp: make IPServiceType= accept "none" to disable tos in the outgoing packet
Fixes #9874.
2021-12-09 15:06:20 +01:00
Yu Watanabe 71df07760e network: sd-ipv4ll and sd-ipv4acd only support ethernet interfaces
The deny list in link_ipv4ll_enabled() are mostly non-ethernet type,
whose link->iftype are not ARPHRD_ETHER, e.g. ARPHRD_NONE for bareudp,
ARPHRD_WIREGURAD for wireguard, ARPHRD_GRE for gre, and so on.

Only the exception is vrf, which is ARPHRD_ETHER, but seems not to
support ARP.
2021-12-09 15:04:43 +01:00
Yu Watanabe 01081e2eab Merge pull request #21692 from yuwata/network-wireguard-allow-to-start-ndisc-or-radv
network: wireguard: allow to start ndisc or radv
2021-12-09 19:53:58 +09:00
Yu Watanabe 63b7d34716 NEWS: add more entries for v250 2021-12-09 19:40:38 +09:00
Yu Watanabe ab8a8a4e77 libsystemd-network: ignore -ENETDOWN or friends in recv()
And this makes most errors in io events ignored.
2021-12-09 09:10:51 +01:00
Yu Watanabe d2d602f4b4 network: refuse empty or numeric route table names 2021-12-09 09:06:41 +01:00
Yu Watanabe 283f7c9872 doc: fix typo 2021-12-09 08:50:19 +01:00
Yu Watanabe e096cab2f3 network: wireguard: allow to run NDisc and RADV when IPv6LL address is manually configured
Fixes #17380.
2021-12-09 15:57:47 +09:00
Yu Watanabe 78ef25a5aa network: address: add scope in debugging logs 2021-12-09 15:28:06 +09:00
Yu Watanabe 20228b6d96 network: address: also adjust scope when address is link local address
But again only when Scope= is not explicitly specified.
2021-12-09 15:25:19 +09:00
Yu Watanabe 8f8dc32cc9 network: address: do not adjust user specified scope
This reverts cd1caf30c0.

I cannot remember why such change was made.
At least, the kernel does not refuse to set IPv4 localhost address with
non-host scope, e.g. global.
2021-12-09 15:25:05 +09:00
Yu Watanabe 72fa19239d network: route: mask lower bits of destination or source prefix
Let's gracefully handle user's misconfiguration, e.g.
Destination=192.168.0.1/24
2021-12-09 07:02:59 +09:00
Yu Watanabe e944711fba network: json: add src address when its prefix length is non-zero
This should not change anything. Just for consistency with
route_set_netlink_message(), which sets RTA_SRC attribute when prefix
length is non-zero.
2021-12-09 07:02:29 +09:00
Yu Watanabe 7cf0ed03f2 network: route: show prefix length of the source in debugging logs
Similar fix to b489d6a26e.
2021-12-09 06:52:01 +09:00
Yu Watanabe 0264c60d44 Merge pull request #21686 from yuwata/network-wlan-fix-reconfigure
network: do not reconfigure wireless interface when previously not connected to any APs
2021-12-09 05:57:12 +09:00
Yu Watanabe c923992c5c Merge pull request #21678 from keszybz/sysusers-work
Make it easier to figure out what sysusers is doing and why
2021-12-09 04:35:50 +09:00
Yu Watanabe d9910948eb network: do not reconfigure wireless interface when previously not connected to any APs
Follow-up for 6706ce2fd2.

Fixes #21685.
2021-12-09 03:04:24 +09:00
Yu Watanabe da94e4ddf5 network: wifi: ssid may be NULL
This fixes the following log message:
systemd-networkd[888]: wlan0: nl80211: received new_interface(7) message: iftype=station, ssid=(null)
2021-12-09 02:43:29 +09:00
Yu Watanabe bb916f350a network: call link_check_ready() when all stacked netdevs are created
Follow-up for 879377cad5.

Otherwise, the underlying interface may stuck in configuring state.
2021-12-08 18:40:13 +09:00
Yu Watanabe 214db8eb5d resolve: do not re-read settings from networkd if link state file is unmodified
If many interface creation/deletion occurs continuously, then resolved
becomes easily busy. Let's slightly optimize the event triggered by
sd-network.
2021-12-08 18:34:08 +09:00
Yu Watanabe 8e0bacab6e sd-network: introduce sd_network_link_get_stat() 2021-12-08 18:34:04 +09:00
Yu Watanabe f4af5f0010 sd-network: drop unnecessary +1 for buffer size 2021-12-08 18:33:35 +09:00
Yu Watanabe 733caba389 Merge pull request #21672 from yuwata/network-old-kernel-support
network: old kernel support
2021-12-08 10:11:20 +09:00
Yu Watanabe 990d0aa980 dhcp: fix assertion failure
Fixes #21671.
2021-12-08 08:52:33 +09:00
Yu Watanabe 8ed68422e1 network: address: read flags from message header when IFA_FLAGS is not supported by kernel
Follow-up for 0828a38605.

Fixes #21670.
2021-12-08 05:40:09 +09:00
Yu Watanabe f14a6e7f48 network: route: tighten variable scope
Follow-up for 5e82a61375.
2021-12-08 05:39:31 +09:00
Yu Watanabe 73fc85227d sd-network: drop _public_ attribute
sd-network is not public yet.
2021-12-08 03:06:44 +09:00
Yu Watanabe 42592d0ad4 test-network: support the case that the default config files are not installed yet 2021-12-07 20:33:20 +09:00
Yu Watanabe 84cc85f983 test-network: add test for 6rd 2021-12-07 20:33:20 +09:00
Yu Watanabe 31fc1366d6 man: network: document Use6RD= setting 2021-12-07 20:33:20 +09:00
Yu Watanabe e49bad0179 network: dhcp-pd: add 6rd support
Closes #19152.
2021-12-07 20:33:16 +09:00
Yu Watanabe dbdcaca3ab sd-dhcp-client: support 6rd option 2021-12-07 20:32:02 +09:00
Yu Watanabe 63dc602570 network: introduce link_remove() 2021-12-07 20:32:02 +09:00
Yu Watanabe a27588d4e7 network: dhcp-pd: rename [DHCPv6PrefixDelegation] -> [DHCPPrefixDelegation]
This just changes the names of settings, variables, functions, files, and so on.
No functionality is changed.

Preparation for supporting 6rd.
2021-12-07 20:30:30 +09:00
Yu Watanabe 5ed057b67b Merge pull request #21653 from yuwata/network-dhcp6pd-unreachable-route-cleanups
network: dhcp6pd: cleanups for unreachable route
2021-12-07 20:28:18 +09:00
Yu Watanabe 334f1a99f7 Merge pull request #21655 from yuwata/network-creating-enslaving-netdev-cleanups
network: cleanups for creating or enslaving netdevs
2021-12-07 20:21:47 +09:00
Yu Watanabe ab0c82d9f7 network: dhcp6pd: assign addresses in the delegated prefix instead of a subnet prefix /64 on upstream interface 2021-12-07 19:46:37 +09:00
Yu Watanabe 2747f1321d network: dhcp6pd: do not check Announce= setting when the link does not support RADV 2021-12-07 19:44:02 +09:00
Yu Watanabe 57c107544d network: fix memleak
Follow-up for ab106a609b.

Fixes CID#1467055.
2021-12-07 19:43:31 +09:00
Yu Watanabe 11d8a83f53 network: dhcp6pd: drop link_has_preferred_subnet_id() and inline condition 2021-12-07 19:43:06 +09:00
Yu Watanabe 557e1b5249 network: dhcp6pd: use the kernel's default value for priority of unreachable route
This should not change any behavior, as both values are equivalent.
2021-12-07 18:35:30 +09:00
Yu Watanabe 2d00239cbe network: dhcp6pd: always use main route table for unreachable route
This mostly reverts e47bcb7d0b.
2021-12-07 18:35:30 +09:00
Yu Watanabe 5ed10a194a network: dhcp6pd: set server address for unreachable route
This is just for json output.
2021-12-07 18:35:30 +09:00
Yu Watanabe a536ec3872 network: dhcp6pd: gracefully handle delegated prefix whose prefixlen is larger than 64 2021-12-07 18:35:26 +09:00
Yu Watanabe 543240f593 network/netdev: drop spurious state from the condition to create stacked netdevs
Stacked netdevs are requested when the underlying interface is in
configuring state.
2021-12-07 15:58:25 +09:00
Yu Watanabe f7144e7b0f network/netdev: create stacked netdevs after all set-link operations are finished
E.g. setting MAC address must be done before creating VLAN interface.
2021-12-07 15:58:25 +09:00
Yu Watanabe 879377cad5 network: do not block configuring addresses by creating stacked netdevs
`link_is_ready_to_configure()` is used to judge we can configure
addresses, routes, and etc. And they can be configured independently of
stacked netdevs.
2021-12-07 15:58:25 +09:00
Yu Watanabe 5329a37935 network: set MAC address before enslaving to bond or bridge interface
As the master interface may inherit the slave MAC address.
2021-12-07 15:58:25 +09:00
Yu Watanabe 45aa0e841b network,udev: do not adjust local assignment bit of specified MAC address
People often assigns the MAC address of the enslaved interface to e.g.
bridge interface. So, the local assignment bit should not be adjusted.

Fixes #21649.
2021-12-07 15:01:04 +09:00
Yu Watanabe f836390fa7 Merge pull request #21642 from yuwata/network-state-file-ignore-dynamic-when-dbus-entry-exists
network: state-file: ignore dynamic entries when specified by DBus method
2021-12-07 09:51:38 +09:00
Yu Watanabe a0af85e02c Merge pull request #21196 from yuwata/process-util-nulstr
process-util: handle double NUL as the end of command line
2021-12-07 08:29:34 +09:00
Yu Watanabe 56437e33a6 network: state-file: do not append dynamic entries when specified by DBus method
Fixes #21515.
2021-12-07 06:43:14 +09:00
Yu Watanabe de1253e4c6 Merge pull request #21638 from yuwata/network-dhcp6pd-prefix-lost
network: dhcp6pd: fix prefix lost handling
2021-12-07 02:54:10 +09:00
Yu Watanabe 2756fb24ee network: state-file: honor dhcp6_use_domains flag 2021-12-07 01:58:35 +09:00
Yu Watanabe aa9de5b1c0 process-util: handle double NUL as the end of command line
Fixes #21186.
2021-12-06 23:42:25 +09:00
Yu Watanabe 95a511b704 process-util: rename function arguments for storing results 2021-12-06 23:21:08 +09:00
Yu Watanabe 2b5587c28f Merge pull request #21620 from yuwata/udev-path-id
udev/path_id: fix skip_subsystem()
2021-12-06 23:15:43 +09:00
Yu Watanabe e3a97777ab Merge pull request #21633 from yuwata/network-route-null-destination
network: route: fix null destination handling
2021-12-06 22:27:37 +09:00
Yu Watanabe 55c3658ba1 Merge pull request #21634 from yuwata/dhcp-header-cleanups
dhcp: trivial header cleanups
2021-12-06 22:26:58 +09:00
Yu Watanabe 416644567b network: dhcp6pd: make dhcp6_pd_assign_prefixes() used also by dhcp6_pd_prefix_acquired() 2021-12-06 21:35:53 +09:00
Yu Watanabe 21cf8e9e6d network: dhcp6pd: first check prefixes, then calculate lifetime 2021-12-06 21:35:53 +09:00
Yu Watanabe 542d04950e network: dhcp6pd: shorten code a bit 2021-12-06 21:35:53 +09:00
Yu Watanabe c3cd535132 network: dhcp6pd: skip to assign prefixes to a downstream link if it is not ready 2021-12-06 21:35:53 +09:00
Yu Watanabe 5014e66019 network: dhcp6pd: move dhcp6_pd_assign_prefixes()
Preparation for the later commits.
2021-12-06 21:35:53 +09:00
Yu Watanabe 4c004e2a71 network: dhcp6pd: also allow to only assign prefix route for delegated prefix to upstream interface 2021-12-06 21:35:53 +09:00
Yu Watanabe da10d2d584 network: dhcp6pd: drop unreachable routes when lease lost 2021-12-06 21:30:57 +09:00
Yu Watanabe 95eb38c8d0 network: route: make route_cancel_request() take Link*
As the Route object may be managed by Manager.
2021-12-06 21:30:57 +09:00
Yu Watanabe 1d44187ce6 network: dhcp6pd: also drop prefix assigned to upstream interface
But do not drop prefixes from downstream which request another uplink.
2021-12-06 21:30:26 +09:00
Yu Watanabe 86a4b84aa9 Merge pull request #21632 from yuwata/network-dhcp6pd-fix-typo-and-split
network: dhcp6pd: fix typo and split file
2021-12-06 21:24:47 +09:00
Yu Watanabe 24888c0b19 Merge pull request #21630 from yuwata/test-network-cleanups
test-network: trivial cleanups
2021-12-06 21:24:26 +09:00
Yu Watanabe ab106a609b network: eui64 address is supported only ethernet or infiniband
So, this makes prefixstable mode will be used for other interface types.
2021-12-06 21:07:12 +09:00
Yu Watanabe 133f65ef2c test-network: start dhcpd after address is assigned 2021-12-06 19:18:55 +09:00
Yu Watanabe 5f7f1f824f test-network: make start_isc_dhcpd() take IP version 2021-12-06 19:18:55 +09:00
Yu Watanabe d5ebcf6533 network: split networkd-dhcp6.c
This moves DHCPv6 prefix delegation related functions to
networkd-dhcp-prefix-delegation.c.
2021-12-06 19:17:09 +09:00
Yu Watanabe ba466f0d4e network: dhcp6pd: fix copy-and-paste error 2021-12-06 19:17:09 +09:00
Yu Watanabe cf477495d6 network: route: handle null address with non-zero prefixlen correctly
Previously, even if a link has a route to e.g. ::/96, default gateway
via ::1.2.3.4 cannot be configured.
2021-12-06 19:16:17 +09:00
Yu Watanabe b489d6a26e network: route: logs null address with non-zero prefixlen correctly 2021-12-06 19:16:17 +09:00
Yu Watanabe 85ede495cc dhcp: fix indentation and alignment 2021-12-06 19:15:42 +09:00
Yu Watanabe d262928879 dhcp6: drop unnecessary space 2021-12-06 19:15:41 +09:00
Yu Watanabe ee44b32ff4 man: netdev: merge and reword Egress/IngressQOSMAps= 2021-12-06 17:59:35 +09:00
Yu Watanabe 9b65490f3f man: netdev: use … to specify range 2021-12-06 16:53:35 +09:00
Yu Watanabe f3fa44cb8e man: netdev: use <varname> tag 2021-12-06 16:51:57 +09:00
Yu Watanabe 472e1349ed man: network: fix default values for DNSSEC= and DNSOverTLS= 2021-12-06 16:30:48 +09:00
Yu Watanabe dee13c2f4e man: network: rebreak lines 2021-12-06 16:28:10 +09:00
Yu Watanabe 6885a857e4 udev/path-id: comment why USB host number is dropped from the PATH_ID
Closes #21617.

The comment is borrowed from https://github.com/systemd/systemd/pull/21620#discussion_r762521508.
2021-12-06 16:06:04 +09:00
Yu Watanabe 56615f203b udev/path_id: fix skip_subsystem()
This partially reverts d340bdd1bd.

The function previously drops multiple except for the last parents
which matches the specified subsystem.
But the commit d340bdd1bd drops all
parents.

E.g. input is pci-pci-pci-usb-usb-usb, then
Before d340bdd: pci-pci-pci-usb
After d340bdd: pci-pci-pci
2021-12-06 16:01:33 +09:00
Yu Watanabe a2887ec370 Merge pull request #21563 from yuwata/network-IPoIB-support
network: IPoIB support
2021-12-05 05:24:01 +09:00
Yu Watanabe a22a8698d9 sd-netlink: fix implicit cast to boolean 2021-12-05 00:19:01 +09:00
Yu Watanabe c3747f90b1 network: set MTU after IPoIB configs are applied
MTU is updated when IB mode is changed.
2021-12-05 00:19:01 +09:00
Yu Watanabe 72e65e6ffd network: add support to configure IPoIB interfaces 2021-12-05 00:18:58 +09:00
Yu Watanabe b90d0f83b2 network/netdev: add support to create IPoIB subinterface 2021-12-04 15:06:58 +09:00
Yu Watanabe a2bf1a61bc sd-netlink: add support for IPoIB 2021-12-04 15:05:33 +09:00
Yu Watanabe a8ee2b8e1f network/netdev: generate persistent MAC address when creating netdev interface
Preparation for later commits.
2021-12-04 15:05:32 +09:00
Yu Watanabe 8feb9fa4f8 Merge pull request #21584 from yuwata/network-wireguard-cleanups
network: cleanups for wireguard
2021-12-02 15:53:57 +09:00
Yu Watanabe 4a410adae6 Revert "network: address: drop deprecated temporary address"
This reverts commit 528da64a0c.

The commit is a bad way to fix #19838, and introduces #21593.

Fixes #21593.
2021-12-02 15:41:45 +09:00