Yu Watanabe
b261b5f416
sd-dhcp6-client: name one more enum
2021-10-12 20:48:19 +09:00
Yu Watanabe
dd5e9378a2
sd-dhcp6-client: typedef several enums
...
Also introduces _MAX and _INVALID for several enums.
2021-10-12 20:48:19 +09:00
Yu Watanabe
d92681a65e
network: dhcp6-pd: also assign addresses in IA_PD prefixes on uplink interface
...
Closes #20808 .
2021-10-12 11:13:25 +01:00
Yu Watanabe
6f47ab1bb1
Merge pull request #20985 from yuwata/test-bus-node-enumerator
...
test: add more tests for sd-bus node enumerator
2021-10-12 15:20:47 +09:00
Yu Watanabe
f21b863eeb
test: use assert_se() instead of assert()
2021-10-12 15:20:28 +09:00
Yu Watanabe
16614bebd8
test: shorten code a bit
2021-10-12 03:31:54 +09:00
Yu Watanabe
165a654e29
network: radv: extends lifetime for DNS servers or domains propagated from uplink
...
Previously, the lifetime was 30 minutes. But it is not necessary to set
to such short time compared with prefix or route prefix lifetime.
Note that the propagated DNS servers and domains are all 'static',
that is, configured in a .network file, and not provided dynamically.
So, it should be safe to use longer lifetime.
2021-10-12 03:10:30 +09:00
Yu Watanabe
9fa25e0791
network: radv: set non-zero lifetime for DNS servers and domains by default
...
Closes #20850 .
2021-10-12 03:10:30 +09:00
Yu Watanabe
2110040b2d
network: radv: verify [IPv6Prefix] and [IPv6RoutePrefix] sections
2021-10-12 03:10:30 +09:00
Yu Watanabe
cf72568ae4
network: radv: mask unnecessary part of specified addresses
2021-10-12 03:10:30 +09:00
Yu Watanabe
2ac4167900
network: radv: make conf parsers not set values into sd_radv_prefix/sd_radv_route_prefix
...
Preparation for later commits.
2021-10-12 03:10:30 +09:00
Yu Watanabe
7ebb14313f
sd-radv: rename sd_radv_prefix_set_route_prefix() -> sd_radv_route_prefix_set_prefix()
2021-10-12 03:10:30 +09:00
Yu Watanabe
e660d66e1c
test: add more node enumerator tests
2021-10-12 03:05:24 +09:00
Yu Watanabe
f533135c6c
Merge pull request #20981 from poettering/glibc-less-internal
...
various clean-ups: use less glibc internal symbols, modernize some other stuff
2021-10-12 02:10:49 +09:00
Yu Watanabe
10285219ea
Merge pull request #20965 from poettering/getdents
...
recurse-dir: use getdents64()
2021-10-12 02:03:12 +09:00
Yu Watanabe
e338284f9b
Merge pull request #20973 from yuwata/busctl-trivial-cleanups
...
busctl: trivial cleanups
2021-10-11 14:03:48 +09:00
Yu Watanabe
84c72b1a23
test: add a test for parsing xml obtained by DBus Introspect method
2021-10-10 21:28:18 +09:00
Yu Watanabe
c58c86d0e2
busctl: add missing header
2021-10-10 21:15:04 +09:00
Yu Watanabe
1b4f2ba28e
busctl: shorten code a bit
2021-10-10 20:26:21 +09:00
Yu Watanabe
911815565a
busctl: use set_ensure_consume()
2021-10-10 19:10:56 +09:00
Yu Watanabe
b00756030b
Merge pull request #20969 from poettering/cryptenroll-no-homed
...
cryptenroll: politely refuse enrolling keys into homed volumes
2021-10-10 16:00:07 +09:00
Yu Watanabe
6830c3a553
Merge pull request #20778 from yuwata/network-ipv6-token
...
network: rework IPv6 address generation mode
2021-10-07 23:24:00 +09:00
Yu Watanabe
d489317f59
Merge pull request #20935 from unusual-thoughts/fix-empty-argv
...
Fix #20933
2021-10-07 01:53:51 +09:00
Yu Watanabe
d3867133f0
udev/net: introduce WakeOnLanPassword=
...
Closes #20913 .
2021-10-07 01:50:37 +09:00
Yu Watanabe
fe2a8b3d3f
test-network: add tests for Token= in [IPv6Prefix]
2021-10-07 01:24:50 +09:00
Yu Watanabe
b48b6bd3b9
test-network: replace deprecated settings
2021-10-07 01:24:50 +09:00
Yu Watanabe
34a3a0c480
network: make generate_eui64_address() static
2021-10-07 01:24:50 +09:00
Yu Watanabe
e609cd0694
network: introduce Token= setting in [IPv6Prefix]
...
Closes #20149 .
2021-10-07 01:24:50 +09:00
Yu Watanabe
f5960e0ab5
network: extend Token= setting in [DHCPv6PrefixDelegation]
...
Now the setting supports the same syntax as the one in the [IPv6AcceptRA]
section.
2021-10-07 01:24:12 +09:00
Yu Watanabe
140bf8dacc
network: introduce Token=eui64
...
So, now user can explicitly request EUI-64 algorithm to generate addresses.
2021-10-07 01:16:36 +09:00
Yu Watanabe
a73628e647
network: rename IPv6Token= in [Network] -> Token= in [IPv6AcceptRA]
...
The token is only used by received prefixes through RA.
2021-10-07 01:16:36 +09:00
Yu Watanabe
868bd1aa1c
network: address-genereation: introduce generate_addresses()
...
Preparation for later commits. This does not change functionality.
2021-10-07 01:16:29 +09:00
Yu Watanabe
d207581fc5
network: address-generation: use in6_addr_hash_ops_free
...
Also, downgrade error level, and caller logs the error.
2021-10-07 01:14:51 +09:00
Yu Watanabe
3bac5fe6c9
network: address-generation: modernize config_parse_address_generation_type()
...
- drop unused _NONE type,
- rename IPv6Token::prefix -> IPv6Token::address,
- clear unused part of IPv6Token::address,
- use Set, instead of OrderedSet.
2021-10-07 01:14:51 +09:00
Yu Watanabe
ffb834cb87
network: address-generation: mask prefix with prefixlen for safety
2021-10-07 01:14:51 +09:00
Yu Watanabe
98692ff3b8
network: address-generation: always start DAD counter from zero
...
The token is stored in Network, and the .network file may be applied to
multiple links.
2021-10-07 01:14:51 +09:00
Yu Watanabe
ac77e0b315
network: address-generation: always use the first 64 bits of the prefix
...
Hopefully, the prefix length is usually 64.
Previously, if the prefix length is smaller than 64, the result address
was undefined.
2021-10-07 01:14:51 +09:00
Yu Watanabe
151b8ea304
network: ndisc: ignore autonomous prefix with prefix length larger than 64
2021-10-07 01:14:47 +09:00
Yu Watanabe
fcd7ad52d7
network: radv: ignore Assign= if prefixlen is larger than 64
2021-10-07 01:09:09 +09:00
Yu Watanabe
00f1261d39
network: make generate_ipv6_eui_64_address() take prefix
...
Also, rename the function.
2021-10-07 01:03:06 +09:00
Yu Watanabe
397c5418f0
network: fix prefixlen for reserved subnet anycast address
...
Then, the prefixlen is not a multiplier of 8, we need to use
in6_addr_prefix_covers().
This also constify the reserved addresses, and rename macros.
2021-10-07 01:03:06 +09:00
Yu Watanabe
f09a474760
network: move address generation methods to network-address-generation.[ch]
2021-10-07 01:03:06 +09:00
Yu Watanabe
e174b43fe4
in-addr-util: introduce in{4,6}_addr_prefix_covers()
2021-10-07 01:03:06 +09:00
Yu Watanabe
6df860f3a0
in-addr-util: do not shift 8 or more for uint8_t
...
See ISO/IEC 9899:TC3 § 6.5.7.3.
2021-10-07 01:03:06 +09:00
Yu Watanabe
333f7d8920
in-addr-util: introduce in{4,6}_addr_mask()
2021-10-07 01:03:06 +09:00
Yu Watanabe
f1cb8933c3
in-addr-util: introduce in6_addr_hash_ops_free
2021-10-07 01:03:06 +09:00
Yu Watanabe
0943b3b7a4
network: radv: reorder functions
...
In other files, we usually (but not always) place functions in the following order:
- network_adjust_xxx(), which applies default or updates settings
specified in .network files,
- link_xxx_enabled(), which checks if the functionality is enabled,
- xxx_new() and xxx_free(), allocator and deallocator for sections,
- functions which apply/update/remove configs
- validators of section,
- conf parsers.
This does not change each function, but just changes the order.
2021-10-07 01:02:59 +09:00
Yu Watanabe
9bd3ecdd8d
ethtool-util: make ethtool_set_wol() take password
2021-10-06 21:57:14 +09:00
Yu Watanabe
20274ab86a
ethtool-util: do not try to enable unsupported WoL options
2021-10-06 21:44:02 +09:00
Yu Watanabe
b4b2a49287
ethtool-util: make wol_options_to_string() not return all flag strings
2021-10-06 21:33:06 +09:00
Yu Watanabe
8688a389ca
core/service: also check path in exec commands
2021-10-06 13:06:00 +02:00
Yu Watanabe
1321f675e7
udev: read more attributes through netlink and cache them
2021-10-06 16:39:52 +09:00
Yu Watanabe
1c2ad7a66c
udev: replace sd_device_get_sysattr_value() with device_get_sysattr_value_maybe_from_netlink()
2021-10-06 16:39:52 +09:00
Yu Watanabe
e44b0fbce7
udev: use LinkInfo::iftype at one more place
2021-10-06 16:39:52 +09:00
Yu Watanabe
78ae4d449e
udev: cache obtained sysattr from netlink into sd_device object
2021-10-06 16:39:52 +09:00
Yu Watanabe
552b1699e2
test: add tests for device_get_sysattr_value_maybe_from_netlink()
2021-10-06 16:39:52 +09:00
Yu Watanabe
d9ea90598f
udev: introduce device_get_sysattr_value_maybe_from_netlink()
2021-10-06 16:39:52 +09:00
Yu Watanabe
6ebc6a4560
udev: rename udev-builtin-net_id-netlink.[ch]
2021-10-06 16:39:52 +09:00
Yu Watanabe
914ac555cd
ether-addr-util: make hw_addr_to_string() return valid string even if hardware address is null
...
Previously, when the length of the hardware address is zero, then the
buffer was not nul-terminated.
This also replaces sprintf() with hexchar().
2021-10-06 16:39:47 +09:00
Yu Watanabe
18b1137977
sd-device: expose device_cache_sysattr_value() and device_get_cached_sysattr_value()
2021-10-06 16:02:06 +09:00
Yu Watanabe
b63dd5aad8
sd-device: make device_get_cached_sysattr_value() distinguish if we have looked up the attribute
2021-10-06 16:00:55 +09:00
Yu Watanabe
1eb3ef78b4
Merge pull request #20937 from poettering/sync-split
...
split up a few files in src/basic/
2021-10-06 12:27:27 +09:00
Yu Watanabe
40971657ce
test-network: add tests for duplicated address setting
...
Also, add more tests for PreferredLifetime=0
C.f. #20891 .
2021-10-04 18:26:35 +09:00
Yu Watanabe
9202b567bc
network: do not ignore critical errors like OOM
2021-10-04 18:26:24 +09:00
Yu Watanabe
8f9bdeabe3
network: downgrade log level for non-critical errors
2021-10-04 18:22:49 +09:00
Yu Watanabe
50783f91d4
network: drop and warn duplicated Address= settings
...
Fixes #20891 .
2021-10-04 18:17:38 +09:00
Yu Watanabe
5b43c2c843
network: rename address_hash_ops -> address_hash_ops_free
...
Preparation for later commits.
2021-10-04 17:59:15 +09:00
Yu Watanabe
6bf03f6f4a
network: make several hash_ops static
2021-10-04 17:59:15 +09:00
Yu Watanabe
f983155736
network: address: fix flags and lifetime in debugging logs
...
Prompted by #20891 .
2021-10-04 17:59:15 +09:00
Yu Watanabe
1924f26d2a
Merge pull request #20777 from benzea/benzea/fix-seccomp-filter
...
seccomp: Always install filters for native architecture
2021-10-01 15:12:55 +09:00
Yu Watanabe
200f77f933
Merge pull request #20876 from poettering/openssl3-creds
...
creds-util: switch to OpenSSL 3.0 APIs
2021-09-30 04:01:57 +09:00
Yu Watanabe
aebff2e7ce
core/mount: add implicit unit dependencies even if when mount unit is generated from /proc/self/mountinfo
...
Hopefully fixes #20566 .
2021-09-29 17:25:13 +02:00
Yu Watanabe
209abeac6d
Merge pull request #20824 from yuwata/sd-dhcp6-client-cleanups
...
sd-dhcp6-client: several cleanups for parsing options
2021-09-30 00:08:16 +09:00
Yu Watanabe
ca6bc7ce0d
Merge pull request #20226 from yuwata/network-introduce-source-and-status
...
network: introduce NetworkConfigSource and NetworkConfigState
2021-09-30 00:06:17 +09:00
Yu Watanabe
bfcc0fedd0
Merge pull request #20871 from mrc0mmand/udevadm-property-value
...
udev: teach udevadm --property=NAME and --value options
2021-09-30 00:05:02 +09:00
Yu Watanabe
504cfa6573
Merge pull request #20877 from yuwata/network-test-mode
...
network: do not update state files when running in test mode
2021-09-30 00:04:41 +09:00
Yu Watanabe
78fac35811
Merge pull request #20823 from mrc0mmand/test-storage-iscsi
...
test: iSCSI-related udev tests
2021-09-29 23:17:43 +09:00
Yu Watanabe
6d350f7d82
Revert "CI: run unit tests in a network namespace"
...
This reverts commit 8b036b223a .
2021-09-29 20:50:37 +09:00
Yu Watanabe
faa2e64f9b
network: do not configure anything when running in test mode
2021-09-29 20:50:37 +09:00
Yu Watanabe
4c78dc17e5
network: do not update state files when running in test mode
...
Fixes #20862 .
2021-09-29 20:50:37 +09:00
Yu Watanabe
92fc611cac
Merge pull request #20802 from yuwata/network-receive-nl80211-multicast-messages
...
network: receive nl80211 multicast messages
2021-09-29 20:49:38 +09:00
Yu Watanabe
96f5f9ef9a
network: receive genl multicast messages about wlan connections
2021-09-29 15:56:20 +09:00
Yu Watanabe
f12629ae38
network: move error handling of enumerating configs to caller side
2021-09-29 15:56:09 +09:00
Yu Watanabe
bdcd4ab2f1
network: make manager_enumerate_internal() take sd_netlink object
...
Preparation for dumping information through generic netlink.
2021-09-29 15:38:59 +09:00
Yu Watanabe
96243149bd
network: split manager_new() into two part
...
Initialize dbus or netlink is not necessary for fuzzers.
2021-09-29 15:38:59 +09:00
Yu Watanabe
16653f9782
wifi-util: introduce nl80211_cmd_to_string()
2021-09-29 15:38:59 +09:00
Yu Watanabe
77f75f4fff
network: rename wifi_iftype -> wlan_iftype
2021-09-29 15:38:59 +09:00
Yu Watanabe
abad436d4c
wifi-util: move, rename, and expose wifi_iftype_to_string()
2021-09-29 15:38:59 +09:00
Yu Watanabe
8e310690b0
sd-netlink: add several attributes for nl80211
2021-09-29 15:38:59 +09:00
Yu Watanabe
f3e235ffb2
sd-netlink, wifi-util: fix attribute type of NL80211_ATTR_SSID
2021-09-29 15:38:59 +09:00
Yu Watanabe
ae2b86de43
wifi-util: add "ret_" prefix for arguments which store results
2021-09-29 15:38:59 +09:00
Yu Watanabe
a1d2ae065b
sd-netlink: introduce sd_netlink_message_read_data_suffix0()
2021-09-29 15:38:59 +09:00
Yu Watanabe
84f7bd7698
sd-netlink: make sd_genl_message_new() or friends return -EOPNOTSUPP if a module is not supported by the kernel
2021-09-29 15:38:55 +09:00
Yu Watanabe
4d4d898a4b
sd-netlink: also check multicast group to find suitable match callback
2021-09-29 15:36:42 +09:00
Yu Watanabe
ec44d3f407
sd-netlink: allow to set dump flag for genl or netfilter messages
2021-09-29 15:35:08 +09:00
Yu Watanabe
dbc35fe3aa
sd-netlink: add type safe macro for sd_genl_add_match()
2021-09-29 15:33:50 +09:00
Yu Watanabe
52888279df
sd-netlink: minor coding style fixes
2021-09-29 15:33:50 +09:00
Yu Watanabe
61dcd98232
basic/linux: update nl80211.h
2021-09-29 15:33:50 +09:00
Yu Watanabe
e210f027e0
sd-dhcp6-client: rename dhcp6_lease_set_dns() -> dhcp6_lease_add_dns()
...
As it is allowed that multiple DNS server options appear in the message.
2021-09-29 15:29:41 +09:00
Yu Watanabe
e693e96961
sd-dhcp6-client: do not merge NTP and SNTP options
...
Previously, SNTP option is ignored when it appears after NTP option(s),
but merged later NTP options when it appears first.
This makes split the NTP and SNTP addresses, and use SNTP addresses only
when no NTP option is provided.
2021-09-29 15:29:41 +09:00