Commit Graph

46937 Commits

Author SHA1 Message Date
lichangze 7c5c59d4b1 hostnamed: map 'all-in-one' DMI chassis type to desktop 2020-09-11 09:55:44 +02:00
Zbigniew Jędrzejewski-Szmek f8bff7805e
Merge pull request #16933 from poettering/copy-hardlinks
copy: optionally recreate hardlinks when copying file trees
2020-09-10 19:04:52 +02:00
Daniel Mack 58695ed50a test: add BridgeMDB to fuzz-network-parser/directives.network 2020-09-10 18:55:20 +02:00
Daniel Mack a1717e9af1 man: document new Network.BridgeMDB config options 2020-09-10 18:55:17 +02:00
Daniel Mack 3db468ea87 network: add support for setting MDB entries
Multicast snooping enabled bridges maintain a database for multicast
port memberships to decide which mulicast packet is supposed to
egress on which port.

This patch teaches networkd to add entries to this database manually
by adding `[BridgeMDB]` sections to `.network` configuration files.
2020-09-10 18:55:15 +02:00
Lennart Poettering 6ae05c9b14
Merge pull request #16947 from keszybz/socket-parsing-rework
Socket parsing rework
2020-09-10 16:47:37 +02:00
Zbigniew Jędrzejewski-Szmek f29d38b7d4
Merge pull request #17003 from yuwata/conf-parser-downgrade-log-level
tree-wide: downgrade log level in conf-parsers
2020-09-10 15:43:29 +02:00
Daniel Mack 1903c9bbbb sd-netlink: add MDB types
These are used to configure multicast membership entries of bridge ports.
2020-09-10 15:29:14 +02:00
Lennart Poettering 3a17308c2a
Merge pull request #16986 from yuwata/network-fix-routing-policy-rule-issue-16784
network: fix routing policy rule issue
2020-09-10 14:50:38 +02:00
Lennart Poettering dee00c1939 fs-util,tmpfiles: fix error handling of fchmod_opath()
When 4dfaa528d4 was first commited its callers relied on `errno` instead of the
return value for error reporting. Which worked fine, since internally
under all conditions base were set — even if ugly and not inline with
our coding style. Things then got broken in
f8606626ed where suddenly additional
syscalls might end up being done in the function, thus corrupting `errno`.
2020-09-10 12:47:50 +02:00
Lennart Poettering bae66f4bda systemd-user: move pam snippet default location to /usr/lib/pam.d 2020-09-10 12:47:07 +02:00
Lennart Poettering c1b9708c10 bootctl: don't accidentally propagate errors in "bootctl status"
Fixes: #16989
2020-09-10 12:45:54 +02:00
Yu Watanabe 87adeabfb7 test-network: update tests for issue #16784 2020-09-10 18:57:07 +09:00
Yu Watanabe 17d2b2e4ef network: replace FRA_IFNAME -> FRA_IIFNAME
No functional change, as FRA_IFNAME is an alias of FRA_IIFNAME.
2020-09-10 18:57:07 +09:00
Yu Watanabe 2102d33cfb network: also process RTM_NEWRULE or RTM_DELRULE message which does not contain src and dst addresses
Fixes #16784.
2020-09-10 18:57:07 +09:00
Yu Watanabe bd1000b4a0 network: fix the default mask for FirewallMark=
And always send FRA_FWMASK if FirewallMark= is set.

C.f. b8964ed9fa

Partially fixes #16784.
2020-09-10 18:56:18 +09:00
Yu Watanabe c2d6fcb147 network: do not assign return value if the parse_fwmark_fwmask() fails
This also removes redundant logs, and makes input string not copied if
it does not contain '/'.
2020-09-10 18:19:03 +09:00
Yu Watanabe d85b0d69f1 network: add debug log for removing routing policy rules 2020-09-10 18:19:03 +09:00
Yu Watanabe 755dbda355 network: also logs priority of routing policy rules 2020-09-10 18:18:59 +09:00
Yu Watanabe b6c7c4a87b network: update log message for rtnl messages 2020-09-10 18:14:24 +09:00
Yu Watanabe 323dda7806 core: downgrade error level and ignore several non-critical errors 2020-09-10 16:24:31 +09:00
Yu Watanabe 144fb165fd homed: downgrade log level 2020-09-10 15:21:43 +09:00
Yu Watanabe adb5848706 journal: downgrade log level 2020-09-10 15:20:35 +09:00
Yu Watanabe 196d41bcde login: downgrade log level if the error will be ignored 2020-09-10 15:18:26 +09:00
Yu Watanabe a864170745 nspawn: downgrade log level if the error will be ignored 2020-09-10 15:16:14 +09:00
Yu Watanabe e459258f19 repart: downgrade log level 2020-09-10 15:08:13 +09:00
Yu Watanabe 94069bef23 resolve: downgrade error level when the error will be ignored 2020-09-10 15:06:29 +09:00
Yu Watanabe 34136e1503 resolve: check DNSSD service name template before assigning it 2020-09-10 15:05:19 +09:00
Yu Watanabe 7a602af041 conf-parser: logs about OOM error 2020-09-10 14:14:19 +09:00
Yu Watanabe 3de39a1ad4 conf-parser: use SYNTHETIC_ERRNO() at one more place 2020-09-10 14:13:56 +09:00
Yu Watanabe c56566530b timesync: downgrade error level when the error will be ignored 2020-09-10 14:13:26 +09:00
Yu Watanabe 40f04cde5b xdg-autostart-generator: downgrade error level when the error will be ignored 2020-09-10 14:07:56 +09:00
Yu Watanabe 8add8b508d vlan: downgrade error level if the error will be ignored 2020-09-10 13:59:04 +09:00
Yu Watanabe 4c382a8772 ethtool: downgrade log level when the error will be ignored 2020-09-10 13:59:04 +09:00
Yu Watanabe e3489e96b3 network: slightly update log message 2020-09-10 13:59:04 +09:00
Yu Watanabe 2ca601d8cb network do not ignore OOM error in config_parse_macsec_key_id() 2020-09-10 13:59:04 +09:00
Yu Watanabe 696c0832e2 network: use _cleanup_ attribute at one more place 2020-09-10 13:59:04 +09:00
Yu Watanabe a8a50f4fb7 network: do not ignore OOM error in wireguard_decode_key_and_warn() 2020-09-10 13:59:04 +09:00
Yu Watanabe 02241e4339 network: unify config_parse_wireguard_public_key() and config_parse_wireguard_preshared_key() 2020-09-10 13:57:39 +09:00
Yu Watanabe c799c93c62 udev: fix indentation
Follow-up for 90e30d767a.
2020-09-10 13:11:43 +09:00
Zbigniew Jędrzejewski-Szmek 293772c27a
Merge pull request #17000 from poettering/network-fixlets
network: a bunch of unimportant cleanups across the board
2020-09-10 00:51:16 +02:00
Zbigniew Jędrzejewski-Szmek c097bf1f50 Minor simplification in sockaddr_un_set_path() 2020-09-10 00:46:44 +02:00
Zbigniew Jędrzejewski-Szmek 08224f38ac Use sockaddr_un_set_path() in socket_address_parse()
Two functional changes:
- "/" is now refused. The test is adjusted.
- The trailing NUL is *not* included in the returned size for abstract size. The
  comments in sockaddr_un_set_path() indicate that this is the right thing to do,
  and the code in socket_address_parse() wasn't doing that.
2020-09-10 00:46:44 +02:00
Zbigniew Jędrzejewski-Szmek a73569f180 shared/socket-netlink: set output in socket_address_parse_netlink() only on success 2020-09-10 00:46:44 +02:00
Zbigniew Jędrzejewski-Szmek a07ab56a49 Allow interface scopes to be specified in ListenStream=
Closes #12624.

The formatting in systemd.socket.xml is updated a bit.

Currently in_addr_port_ifindex_name_to_string() always prints the ifindex
numerically. This is not super useful since the interface numbers are
semi-random. Should we use interface names in preference?
2020-09-10 00:46:44 +02:00
Zbigniew Jędrzejewski-Szmek c4c6ee3a95 resolved: drop duplicated check
The same conditional appears a few lines down.
2020-09-10 00:46:44 +02:00
Zbigniew Jędrzejewski-Szmek 44ab234734 shared: don't unconditionally set SOCK_STREAM as type in socket_address_parse()
We would set .type to a fake value. All real callers (outside of tests)
immediately overwrite .type with a proper value after calling
socket_address_parse(). So let's not set it and adjust the few places
that relied on it being set to the fake value.

socket_address_parse() is modernized to only set the output argument on
success.
2020-09-10 00:46:44 +02:00
Zbigniew Jędrzejewski-Szmek 75af1666d7 shared: make socket_address_parse use the generic parser for IPv[46] addresses
One special syntax is not supported anymore: "iface:port" would be parsed as an
interface name plus numerical port, equivalent to "[::]%iface:port". This was
added in 542563babd, but was undocumented, and we had no tests for it. It seems
that this actually wasn't doing anything useful, because the kernel only uses the
scope identifier for link-local addresses.
2020-09-10 00:46:44 +02:00
Zbigniew Jędrzejewski-Szmek 222eaaf937 Get rid of in_addr_port_from_string_auto() again
With the commit "shared/socket-netlink: only allow ifindex if explicitly supported"
this helper is not necessary anymore.
2020-09-10 00:46:44 +02:00
Zbigniew Jędrzejewski-Szmek c1f848d73c shared: check interface name validity in in_addr_port_ifindex_name_from_string_auto()
We don't try to resolve invalid ifnames as all. A different return
code is used. This difference will be verified later in test_socket_address_parse()
when socket_address_parse() is converted to use
in_addr_port_ifindex_name_from_string_auto().
2020-09-10 00:46:44 +02:00