Commit Graph
100 Commits
Author SHA1 Message Date
Yu Watanabe c8e16339f1 Merge pull request #21503 from poettering/ioprio-fix
work around linux 5.15 ioprio API breakage
2021-11-25 14:23:02 +09:00
Yu Watanabe 9eeaa94fd0 Merge pull request #21492 from andch-nn/add-micmute-dell-machine
Add micmute for dell machine
2021-11-25 13:52:26 +09:00
Yu Watanabe 030e2a7734 Merge pull request #21506 from poettering/homed-uidmap-fixes
homed uidmap (and other) fixes
2021-11-25 13:37:46 +09:00
Yu Watanabe a83161d08b Merge pull request #21508 from poettering/conn-count-fix
pid1: fix connection counting
2021-11-25 13:33:13 +09:00
Yu Watanabe cc0f820960 Merge pull request #21435 from yuwata/network-cleanups-for-alternative-names
network: cleanups for alternative names
2021-11-19 12:05:04 +09:00
Yu Watanabe a72d2a7bca network: always try to reconfigure when carrier gained
When networkd detects a wlan interface, the interface may not be
connected to any access point, and may enter the unmanaged state.
After the interface connected to an access point, previously networkd
did not reconfigure the interface. This fixes the issue.
2021-11-19 12:04:42 +09:00
Yu Watanabe 558434a4aa man: add new man page org.freedesktop.network1 2021-11-19 07:23:40 +09:00
Yu Watanabe 6b4c1c9f3c network: support --bus-introspect option 2021-11-19 06:50:02 +09:00
Yu Watanabe 6e194652b8 network: use BusObjectImplementation 2021-11-19 06:49:25 +09:00
Yu Watanabe 1b345c1e3b network: skip re-generating map from alternative names to link 2021-11-19 06:13:02 +09:00
Yu Watanabe 50df02a705 network: do not clear map from alternative names to link when IFLA_PROP_LIST attribute is not contained
No IFLA_PROP_LIST attribute contained does not means the interface
has no alternative name.
E.g. the message created by inet6_fill_ifinfo() in net/ipv6/addrconf.c
does not contain IFLA_PROP_LIST.
2021-11-19 06:13:02 +09:00
Yu Watanabe b36caceb88 test-network: check if actually alternative name is set
Fixes #21404.
2021-11-17 12:58:08 +09:00
Yu Watanabe 3e3b0d2a40 test-network: make udevd also generate debugging logs 2021-11-17 08:32:45 +09:00
Yu Watanabe b2174e2922 network: accept all values provided by kernel
Follow-up for af493fb742.

The kernel sends FRA_SUPPRESS_IFGROUP attribute with -1, that must be
handled by networkd.

For FRA_SUPPRESS_PREFIXLEN, we already handled -1, but ignored values
larger than 128. We should not configure rules with such a meaningless
value, but should manage such rules when received from kernel. It can
occur when created by other tools mistakenly. If networkd ignores them,
then networkd cannot remove them.
2021-11-16 23:31:24 +00:00
Yu Watanabe 39b91d1ae4 network: tuntap: drop unnecessary minus 2021-11-16 16:53:43 +01:00
Yu Watanabe faa201dc6b network: address: explicitly mention that the address is localhost 2021-11-16 16:01:18 +09:00
Yu Watanabe d8c472f297 network: address: use route_scope_from_string() 2021-11-16 16:01:18 +09:00
Yu Watanabe 50e67237a7 Merge pull request #21377 from poettering/slow-math
meson: stop using -ffast-math
2021-11-16 10:33:48 +09:00
Yu Watanabe 7777024dab Merge pull request #21344 from yuwata/network-ignore-carrier-loss-timespan
network: make IgnoreCarrierLoss= also take a timespan
2021-11-16 10:27:01 +09:00
Yu Watanabe d068f3a243 Merge pull request #21235 from bacher09/slava/supress_ifgroup
Add suppress_ifgroup option in routing policy
2021-11-16 10:25:33 +09:00
Yu Watanabe 6706ce2fd2 network: make IgnoreCarrierLoss= also take timespan
Fixes #18738 and #20887.

Replaces #18746.
2021-11-16 02:04:59 +09:00
Yu Watanabe 26591ffffd resolve: do not clear DNS servers or friends on link which is not managed by networkd
When networkd detects an unmanaged link, then the state is changed in
the following order:
pending -> initialized -> unmanaged

The "initialized" state was added by bd08ce5615.
2021-11-15 08:17:34 +09:00
Yu Watanabe 51f6c93d21 Merge pull request #21359 from yuwata/network-split-route
network: log route or nexthop flags
2021-11-15 08:17:07 +09:00
Yu Watanabe bae62bee43 Merge pull request #21346 from yuwata/network-token-prefixstable
network: extend Token=prefixstable setting
2021-11-15 08:16:48 +09:00
Yu Watanabe b07d8145e1 network: include route or nexthop flags in the debug logs 2021-11-14 14:41:37 +09:00
Yu Watanabe 18b23bd493 network: introduce route_flags_to_string_alloc() 2021-11-14 14:41:37 +09:00
Yu Watanabe 344b3cff36 network: split networkd-route.[ch] 2021-11-14 14:41:37 +09:00
Yu Watanabe 10b1c3cd24 Merge pull request #21355 from bluca/coverity
Coverity and CodeQL fixes
2021-11-14 14:18:08 +09:00
Yu Watanabe 7a2e124b08 test-network: add testcases for Token=prefixstable with UUID 2021-11-14 13:29:44 +09:00
Yu Watanabe f2a3a133ec network: make Token=prefixstable optionally take secret key
Closes #21345.
2021-11-14 13:29:40 +09:00
Yu Watanabe b7ac128430 network: do not recall link_handle_bound_by_list() or so when the interface is reconfigured 2021-11-14 11:52:49 +09:00
Yu Watanabe 52c3bc708f event-util: introduce event_reset_time_relative() 2021-11-14 10:32:06 +09:00
Yu Watanabe c463ae74ae man: fix indentation
Also use variablelist tag for listing Token= options.
2021-11-14 10:30:33 +09:00
Yu Watanabe 1de88f3048 udev/net: read hardware address from netlink message 2021-11-13 08:53:33 +09:00
Yu Watanabe 49c351a8ac networkctl: read permanent hardware address from netlink message 2021-11-13 08:53:33 +09:00
Yu Watanabe 8a77e245df network: also logs iftype, kind, and permanent hardware address 2021-11-13 08:53:33 +09:00
Yu Watanabe 4fea97a61d network: read permanent hardware address from netlink message
The attribute was introduced by f74877a5457d34d604dba6dbbb13c4c05bac8b93 (v5.6),
so, fallback to ethtool if failed.
2021-11-13 08:53:33 +09:00
Yu Watanabe ed9fa69f1c ethtool-util: introduce ethtool_get_permanent_hw_addr()
And replaces all ethtool_get_permanent_macaddr() with it.
2021-11-13 08:53:33 +09:00
Yu Watanabe 57ae8cd812 networkctl: introduce dump_hw_address() 2021-11-13 08:53:33 +09:00
Yu Watanabe 17f8d8f9b4 network: manage route and nexthop flags 2021-11-13 08:16:06 +09:00
Yu Watanabe f505de80d2 network: mention that errors will be ignored 2021-11-13 08:16:06 +09:00
Yu Watanabe 5bfee718d2 sd-netlink: introduce sd_rtnl_message_nexthop_get_flags() 2021-11-13 08:16:06 +09:00
Yu Watanabe 45b1299a1e sd-netlink: clear previous flags or state by _set_flags() or _set_state()
Otherwise, there is no way to reset the previous value.
2021-11-13 08:16:06 +09:00
Yu Watanabe a55277b889 test: add tests for MAC address helper functions 2021-11-12 20:00:50 +09:00
Yu Watanabe 847f1ea69e ether-addr-util: fix ether_addr_is_local() and add one more helper
Follow-up for 1f86a3fe52.
2021-11-12 20:00:29 +09:00
Yu Watanabe a914901d38 test: use kbd-mode-map we ship in one more test case
Follow-up for be0cc2ce6c.

Fixes https://github.com/systemd/systemd/pull/19670#issuecomment-965817823.
2021-11-11 09:54:01 +00:00
Yu Watanabe dfa4876c41 udev: drop colon from ID_NET_NAME_MAC
Fixes a bug introduced by eaba9bb3e6.
2021-11-11 18:29:55 +09:00
Yu Watanabe e44cd43788 ether-addr-util: introduce hw_addr_to_string_full() 2021-11-11 18:29:52 +09:00
Yu Watanabe 13b7b8bd73 network: neighbor: accept an empty string assignment 2021-11-11 12:49:42 +09:00
Yu Watanabe 17193d767d network: neighbor: use "struct hw_addr_data" to store link layer address 2021-11-11 12:49:42 +09:00
Yu Watanabe ca7d208367 ether-addr-util: expose hw_addr_hash_func() 2021-11-11 12:49:42 +09:00
Yu Watanabe c990101f23 sd-netlink: fix type of NDA_LLADDR attribute 2021-11-11 12:49:42 +09:00
Yu Watanabe 9133c1877f netif-util: fix stack-use-after-scope
Fixes a bug introduced by 0295b2fd1d.

Fixes #21292.
2021-11-10 22:11:18 +00:00
Yu Watanabe e2b777f821 sd-id128: use /proc/device-tree 2021-11-11 04:42:50 +09:00
Yu Watanabe c6dce5720c condition: use /proc/device-tree/ 2021-11-11 04:42:50 +09:00
Yu Watanabe e6cbe6970f hostnamed: use /proc/device-tree to get chassis type
From https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-firmware-ofw
---
Userspace must not use the /sys/firmware/devicetree/base
path directly, but instead should follow /proc/device-tree
symlink. It is possible that the absolute path will change
in the future, but the symlink is the stable ABI.
---

Addresses the comment https://github.com/systemd/systemd/pull/20731#discussion_r744095262.
2021-11-11 04:42:50 +09:00
Yu Watanabe 4883a5ec6c network: cake: fix copy-and-paste error
Follow-up for 35896db489.

Fixes CID#1465796.
2021-11-10 10:35:36 +01:00
Yu Watanabe 8c66ab20f6 man: use include directive for [Match] section 2021-11-10 10:59:21 +09:00
Yu Watanabe 33132db903 man: add missing Firmware= setting 2021-11-10 10:56:42 +09:00
Yu Watanabe 5ff3c71af8 Merge pull request #21276 from yuwata/ether-addr-util
ether-addr-util: introduce parse_hw_addr() and related conf parsers
2021-11-10 09:22:01 +09:00
Yu Watanabe 3f6a18633f Merge pull request #21281 from poettering/repart-align-fixes
repart: fixes when operating on unaligned partitions
2021-11-10 09:21:24 +09:00
Yu Watanabe 99628f363b conf-parser: introduce config_parse_hw_addr() and config_parse_hw_addrs() 2021-11-09 21:39:09 +09:00
Yu Watanabe c6df73ca72 ether-addr-util: introduce {hw,ether}_addr_hash_ops_free 2021-11-09 21:39:09 +09:00
Yu Watanabe aa4f765326 conf-parser: rename config_parse_hwaddr() -> config_parse_ether_addr() 2021-11-09 21:39:09 +09:00
Yu Watanabe 227e9ce255 ether-addr-util: replace ether_addr_from_string() with parse_ether_addr() 2021-11-09 21:39:09 +09:00
Yu Watanabe 02160bc909 ether-addr-util: introduce parse_ether_addr() 2021-11-09 21:39:09 +09:00
Yu Watanabe fb4e524180 test: add tests for parse_hw_addr() 2021-11-09 21:39:09 +09:00
Yu Watanabe 76a5d3dee2 ether-addr-util: introduce parse_hw_addr() 2021-11-09 21:39:05 +09:00
Yu Watanabe 777c17b9d1 Merge pull request #21269 from yuwata/network-netdev-cleanups
network/netdev: several trivial cleanups
2021-11-09 19:08:11 +09:00
Yu Watanabe b01895bf70 arp-util: drop redundant line
The client's IP address is already loaded to X.
(The comment of the dropped line is wrong, X instead of A.)
2021-11-09 09:32:09 +01:00
Yu Watanabe bc945c2b42 network/netdev: sort netdev kinds 2021-11-09 16:00:49 +09:00
Yu Watanabe ad851caebd network/bridge: drop if_bridge.h from bridge.h
To avoid future header conflicts.
2021-11-09 16:00:49 +09:00
Yu Watanabe fddb337cc8 network/netdev: fix typo 2021-11-09 16:00:49 +09:00
Yu Watanabe e331889a5e network: bareudp: use fill_message_create 2021-11-09 16:00:49 +09:00
Yu Watanabe 8e30e5fcd4 network: geneve: use fill_message_create 2021-11-09 16:00:49 +09:00
Yu Watanabe 7f0ed7d1c9 network/netdev: update comment 2021-11-09 16:00:49 +09:00
Yu Watanabe 28a8cc0a44 network/netdev: reduce indentation 2021-11-09 16:00:45 +09:00
Yu Watanabe e5a7570188 Merge pull request #21226 from yuwata/network-tc-cake
network: add several CAKE settings
2021-11-09 14:18:41 +09:00
Yu Watanabe 2c7b14fa19 Merge pull request #21268 from yuwata/network-ndisc-use-gateway
network: ndisc: introduce UseGateway= and UseRoutePrefix=
2021-11-09 11:33:21 +09:00
Yu Watanabe 0b251e8bf9 test-network: add testcases for CAKE settings 2021-11-09 10:58:44 +09:00
Yu Watanabe 1c7a81e626 network: tc/cake: introduce UseRawPacketSize= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 35896db489 network: tc/cake: introduce SplitGSO= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe d05dce95d8 network: tc/cake: introduce Wash= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 049b66ccdd network: tc/cake: introduce FirewallMark= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe fe8e156e7a network: tc/cake: introduce PriorityQueueingProfile= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 863542e1ce network: tc/cake: introduce MPUBytes= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 4bff808648 network: tc/cake: introduce NAT= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe a049cf166c network: tc/cake: introduce FlowIsolationMode= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe b6eccfda1a network: tc/cake: introduce CompensationMode= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 3a86a31e0c network: tc/cake: do not pass 0 if OverheadBytes= is not specified 2021-11-09 10:58:44 +09:00
Yu Watanabe 025cd94e1c network: tc/cake: introduce AutoRateIngress= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 69978eb910 man: use "…" for specifying ranges 2021-11-09 10:58:44 +09:00
Yu Watanabe ca2c3e921f man: move Bandwidth= setting at the beginning of the [CAKE] section
For consistency with tc-cake(8).
2021-11-09 10:58:44 +09:00
Yu Watanabe fb076d5f6c sd-netlink: add more attributes for CAKE 2021-11-09 10:58:44 +09:00
Yu Watanabe 0295b2fd1d netif-util: split net_get_unique_predictable_data() into two 2021-11-09 08:24:10 +09:00
Yu Watanabe 043b193f6e netif-util: rename net_get_name_persistent() -> net_get_persistent_name() 2021-11-09 08:24:10 +09:00
Yu Watanabe 4eef6fad31 netif-util: rename link_get_type_string() -> net_get_type_string() 2021-11-09 08:24:10 +09:00
Yu Watanabe b5cc5591fa netif-util: move several functions from network-util.[ch] to shared/netif-util.[ch]
These functions are not relevant to sd-network, and only used by
networkd, networkctl, and udevd.
2021-11-09 08:24:10 +09:00
Yu Watanabe 91961fff43 arphrd-util: introduce arphrd_to_hw_addr_len() 2021-11-09 08:24:10 +09:00
Yu Watanabe f09d20256a arphrd-util: rename arphrd-list.[ch] -> arphrd-util.[ch] 2021-11-09 08:24:10 +09:00