Yu Watanabe
85b6a8110d
network: do not add prefix to RA if radv is not configured
...
Fixes #17017 .
2020-09-11 19:28:46 +02:00
Yu Watanabe
766f8f388f
test-network: add test for ENOBUFS issue #17012
...
The issue seems already fixed by PR #16982 and its follow-up commit
4934ba2121 .
2020-09-11 18:07:47 +02:00
Yu Watanabe
3bacb7e73b
backlight: validate read sysattr value
...
If actual_brightness is larger than max_brightness, then fall back to
use brightness attribute.
Also, if the saved value is invalid, then this makes remove the file in
/var/lib/systemd/backlight.
Hopefully fixes #17011 .
2020-09-11 17:46:11 +09:00
Yu Watanabe
06d98bdc81
backlight: do not claim that ID_BACKLIGHT_CLAMP= property is not set
2020-09-11 17:44:20 +09:00
Yu Watanabe
ea2bc25762
sd-device: introduce sd_device_set_sysattr_valuef()
2020-09-11 17:41:10 +09: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. https://github.com/torvalds/linux/commit/b8964ed9fa727109c9084abc807652ebfb681c18
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
Yu Watanabe
e77f52e5f9
udev: warn if failed to set buffer size for device monitor
2020-09-09 06:46:54 +09:00
Yu Watanabe
a725efb08b
network: increase receive buffer size for device monitor
...
If networkd creates huge amount of netdevs, then the buffer of device
monitor becomes easily flowed.
Hopefully fixes #16865 .
2020-09-09 06:39:05 +09:00
Yu Watanabe
d31f33e3c9
network: do not start device monitor if /sys is read-only
...
Follow-up for bf331d8717 .
2020-09-09 06:39:05 +09:00
Yu Watanabe
e13af7bdb6
network: honor the buffer size specified in networkd.socket
2020-09-09 06:39:05 +09:00
Yu Watanabe
ded71ab3bc
core/socket: use fd_set_{rcv,snd}buf()
2020-09-09 06:39:05 +09:00
Yu Watanabe
2807a79424
sd-device-monitor: use fd_set_rcvbuf()
2020-09-09 06:39:05 +09:00
Yu Watanabe
d9d9b2a0ae
util: introduce fd_set_{snd,rcv}buf()
2020-09-09 06:39:05 +09:00
Yu Watanabe
b92f350789
util: try to set with SO_{RCV,SND}BUFFORCE when requested size is larger than the kernel limit
...
The commit 10ce2e0681 inverts the order of
SO_{RCV,SND}BUFFORCE and SO_{RCV,SND}BUF. However, setting buffer size with
SO_{RCV,SND}BUF does not fail even if the requested size is larger than
the kernel limit. Hence, SO_{RCV,SND}BUFFORCE will not use anymore and
the buffer size is always limited by the kernel limit even if we have
the priviledge to ignore the limit.
This makes the buffer size is checked after configuring it with
SO_{RCV,SND}BUF, and if it is still not sufficient, then try to set it
with FORCE command. With this commit, if we have enough priviledge, the
requested buffer size is correctly set.
Hopefully fixes #14417 .
2020-09-09 06:39:05 +09:00
Yu Watanabe
1263c85ef3
util: refuse to set too large value for socket buffer size
2020-09-09 06:39:05 +09:00
Yu Watanabe
8c63924c8d
network: ignore error on increasing netlink receive buffer size
2020-09-09 06:39:05 +09:00
Yu Watanabe
d157714b68
network: make log_link_error() or friends return void
2020-09-09 02:34:38 +09:00
Yu Watanabe
8ed6f81ba3
core: make log_unit_error() or friends return void
2020-09-09 02:34:38 +09:00
Yu Watanabe
93c5b90459
core/slice: explicitly specify return value
2020-09-09 02:34:38 +09:00
Yu Watanabe
38104ee2a5
udev: do not discard const qualifier
2020-09-09 02:34:38 +09:00
Yu Watanabe
ab54f12b78
sd-device: make log_device_error() or friends return void
2020-09-09 02:34:38 +09:00
Yu Watanabe
09c69ecaeb
udev: explicitly specify return value
2020-09-09 02:34:38 +09:00
Yu Watanabe
a718b951ac
udev: return negative errno for invalid EVDEV_ABS_XXX= property
2020-09-09 02:34:38 +09:00
Yu Watanabe
3b4e123173
udev: make log_rule_error() or friends return void
2020-09-09 02:34:38 +09:00
Yu Watanabe
68248f43fc
test-network: add test for IPv6Token=prefixstable
2020-09-08 14:32:44 +09:00
Yu Watanabe
b27caa34f6
network: make prefixstable mode of IPv6Token= can be applied to any received prefixes
...
Closes #4625 .
2020-09-08 14:32:33 +09:00
Yu Watanabe
50550722e3
network: fix NDisc handling for the case when multiple routers exist
...
69203fba70 does not consider the case that
multiple routers exist, and causes #16719 .
Fixes #16719 .
2020-09-08 02:30:04 +09:00
Yu Watanabe
501b09dbf2
network: expose route_{hash,compare}_func()
2020-09-08 02:30:04 +09:00
Yu Watanabe
99a2878457
network: expose address_{hash,compare}_func()
2020-09-08 02:30:04 +09:00
Yu Watanabe
badd49288d
util: expose in6_addr_{hash,compare}_func()
2020-09-08 02:30:04 +09:00
Yu Watanabe
f3f14c573b
util: constify the second argument of set_get()
2020-09-04 17:52:26 +02:00
Yu Watanabe
89f7435d0c
resolve: use correct fd for UDP stub listner
2020-09-04 23:54:35 +09:00
Yu Watanabe
d1fb8cdae2
resolve: do not check sender and destination for packet received by extra DNS stub listner
2020-09-04 23:54:35 +09:00
Yu Watanabe
7216a3b5dc
resolve: use sd_event_source_set_io_fd_own() for stub listners
2020-09-04 23:54:35 +09:00
Yu Watanabe
bf22f231cf
resolve: introduce dns_stub_listener_extra_free() and set it as a key destructor
2020-09-04 23:54:35 +09:00
Yu Watanabe
1c17bcb3ad
resolve: adjust error messages
2020-09-04 23:54:35 +09:00
Yu Watanabe
af8b138422
resolve: do not set IPv4 specific options on IPv6 socket
2020-09-04 23:54:30 +09:00
Yu Watanabe
d40f00d798
resolve: do not set IP_TTL for extra DNS stub listeners
2020-09-04 23:53:22 +09:00
Yu Watanabe
180c22328b
missing: add IPV6_FREEBIND
2020-09-04 23:53:18 +09:00
Yu Watanabe
fc7676e313
util: drop unused socket_addr_port_from_string_auto()
2020-09-04 20:05:58 +09:00
Yu Watanabe
ca8b62b522
resolve: use in_addr_union to store addresses for extra dns stub listeners
2020-09-04 20:05:58 +09:00
Yu Watanabe
b4b7ea1b32
resolve: fix indentation
2020-09-04 20:05:58 +09:00
Yu Watanabe
4e0a46f65e
util: introduce SOCKADDR_LEN() macro
2020-09-04 20:05:58 +09:00
Yu Watanabe
fc6021554b
test: add tests for in_addr_port_from_string_auto()
2020-09-04 20:05:58 +09:00
Yu Watanabe
23c5aeaac3
test: move several tests from test-socket-util.c
2020-09-04 20:05:58 +09:00
Yu Watanabe
c4fe658366
util: introduce in_addr_port_to_string()
2020-09-04 20:05:58 +09:00
Yu Watanabe
c364cefb3a
util: make in_addr_ifindex_to_string() an alias of in_addr_port_ifindex_name_to_string()
2020-09-04 20:05:58 +09:00
Yu Watanabe
355e884ded
util: introduce in_addr_port_from_string_auto()
2020-09-04 20:05:58 +09:00
Yu Watanabe
4650582657
resolve: stop extra stub listners before freeing information about them
2020-09-04 20:05:58 +09:00
Yu Watanabe
7314b39746
resolve: set DNS_STUB_LISTENER_YES if no protocol is specified in DNSStubListenExtra=
2020-09-04 20:05:58 +09:00
Yu Watanabe
dce65cd40f
resolve: Manager::dns_stub_listener_mode is not relevant to extra stub listeners
2020-09-04 20:05:58 +09:00
Yu Watanabe
88d2cb7c0e
resolve: make DnsStubListenerMode bitfield
2020-09-04 20:05:58 +09:00
Yu Watanabe
8ae07803a0
resolve: rename dns_stub_extra_event_source -> event_source
...
As the name is too redundant.
2020-09-04 20:05:58 +09:00
Yu Watanabe
6421194b31
man: update DNSStubListenerExtra=
2020-09-04 20:05:54 +09:00
Yu Watanabe
aea4660af8
test: add tests for sd_bus_error_set_errnof()
2020-09-04 19:15:50 +09:00
Yu Watanabe
caf4ba83d5
sd-bus: use _cleanup_free_ macro in sd_bus_error_set_errnofv()
...
No functional change.
2020-09-04 19:15:45 +09:00
Yu Watanabe
2200c3cf56
network: fixes gateway assignment through DHCPv4
...
This fixes the following issue:
- If a DHCP lease does not contains router option, then routes with
`Gateway=_dhcp` setting introduce unexpected results.
This also makes several failure paths critical. And adjust warnings when
classless routes are provided.
2020-09-04 11:12:03 +02:00
Yu Watanabe
3605aae161
bash-completion: resolvectl: support 'log-level' command
2020-09-04 17:03:28 +09:00
Yu Watanabe
bde4bc9bd2
resolvectl: add 'log-level' to help message
...
Follow-up for df9578498f .
2020-09-04 16:58:36 +09:00
Yu Watanabe
ed89e54a49
man: mention that 'networkctl reconfigure' does not reload configs
2020-09-04 09:05:45 +09:00
Yu Watanabe
c45fdad66d
network: configure DHCP routes after DHCP address is ready
2020-09-04 09:05:45 +09:00
Yu Watanabe
687b3bc6f4
network: dhcp4: reset counter only when the lease address is new
2020-09-04 09:05:45 +09:00
Yu Watanabe
4dd6a3aad5
sd-ipv4acd: introduce sd_ipv4acd_get_address()
2020-09-04 09:05:45 +09:00
Yu Watanabe
5acf54a063
network: dhcp4: stop IPv4ACD before assigning new address
2020-09-04 09:05:34 +09:00
Yu Watanabe
6a776e3a18
sd-ipv4acd: do not call callback in sd_ipv4acd_stop() when it is already stopped
2020-09-04 09:04:43 +09:00
Yu Watanabe
dce1cd4188
network: voidify return value of sd_ipv4acd_stop()
2020-09-04 09:04:43 +09:00
Yu Watanabe
5c72a6d5d3
network: logs about unknown key
2020-09-04 08:48:08 +09:00
Yu Watanabe
f405179d65
network: honor already specified family when parsing from= or to= in serialized rule
2020-09-04 08:48:08 +09:00
Yu Watanabe
9d6282d120
network: do not reallocate buffer
2020-09-04 08:48:04 +09:00
Yu Watanabe
d0ac05613b
network: serialize InvertRule= in [RoutingPolicyRule]
2020-09-04 08:47:22 +09:00
Yu Watanabe
1680b11df4
network: add whitespace after family= and priority= in serialized routing policy rule
...
This also makes priority= serialized only when its value is non-zero.
2020-09-04 08:44:19 +09:00
Yu Watanabe
3c94b20dd3
network: downgrade error level when the error is ignored
2020-09-04 08:44:14 +09:00
Yu Watanabe
7e60a37d04
network: move routing_policy_rule_read_full_file()
2020-09-04 08:42:01 +09:00