1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00
Commit Graph

47488 Commits

Author SHA1 Message Date
Yu Watanabe
f9bb333832 network: manage multipath routes separately 2020-10-08 02:51:23 +09:00
Yu Watanabe
de52a83cb7 sd-netlink: introduce sd_netlink_message_read_data() 2020-10-08 02:51:23 +09:00
Yu Watanabe
2fe1d557e5 sd-netlink: introduce rtattr_read_nexthop() 2020-10-08 02:51:23 +09:00
Yu Watanabe
d6ad41e27d network: free Route object when route_remove() fails
When route_remove() succeeds, the Route object will be freed later by
manager_rtnl_process_route().
2020-10-08 02:51:23 +09:00
Yu Watanabe
423c249c2e network: constify arguments 2020-10-08 02:51:23 +09:00
Yu Watanabe
297f9d86fe test-network: add a test case for IPv4 route with IPv6 gateway 2020-10-08 02:51:13 +09:00
Renaud Métrich
5177cb0a9a unit: don't emit PropertiesChanged signal if adding a dependency to a unit is a no-op 2020-10-07 18:16:08 +02:00
Yu Watanabe
6dd5398137 network: support IPv4 route with IPv6 gateway 2020-10-08 00:06:19 +09:00
Yu Watanabe
2c59a8a624 sd-netlink: fix type of RTA_VIA 2020-10-07 15:22:10 +02:00
Yu Watanabe
ad208fac73 network: also manage routes without RTA_OIF attribute 2020-10-07 15:22:10 +02:00
Yu Watanabe
fd7701bf31 network: ignore Scope= for IPv6 routes as it will not be used 2020-10-07 15:22:10 +02:00
Yu Watanabe
0a2808a208 test-network: drop meaningless Scope= settings in the config 2020-10-07 15:22:10 +02:00
Yu Watanabe
8973df5c42 network: set default priority for IPv6 routes
See inet6_rtm_newroute() in kernel's net/ipv6/route.c.
2020-10-07 15:22:09 +02:00
Yu Watanabe
b2f61e0da0 basic: import linux/ipv6_route.h 2020-10-07 15:22:09 +02:00
Yu Watanabe
473a64e569 meson: add missing files 2020-10-07 15:22:09 +02:00
Lennart Poettering
b8aaceb9b5 systemctl: drop unsused variable original_stdout_is_tty
Unused since de9a8fe18e.
2020-10-07 14:13:19 +02:00
Lennart Poettering
816d460a7c update TODO 2020-10-07 14:12:19 +02:00
Lennart Poettering
1378ac6989
Merge pull request #17231 from poettering/event-source-exit-on-failure
sd-event: add "exit-on-failure" feature for event source
2020-10-07 12:55:56 +02:00
Zbigniew Jędrzejewski-Szmek
206178a9d2 Document some reasonable DNS servers in the example config file
We have an option to set the fallback list, so we don't know what the contents
are. It may in fact be empty. Let's add some examples to make it easy for a user
stranded without any DNS to fill in something that would work. As a bonus, this
also gives names to the entries we provide by default.
(I added google and cloudflare because that's what we have currently, and quad9
because it seems to be a good privacy-concious and fast choice and was requested
in #12499. As a minimum, things we should include should be well-known global
services with a documented privacy policy and both IPv4 and IPv6 support and
decent response times.)
2020-10-07 11:38:07 +02:00
Lennart Poettering
85585b767d
Merge pull request #17238 from keszybz/man-tmp-noexec
Say that noexec should not be used for /tmp
2020-10-07 09:45:58 +02:00
Lennart Poettering
cbda8bd5fb udev: make use of NULL callback in IO handlers 2020-10-07 09:40:32 +02:00
Lennart Poettering
b9350e70aa sd-event: support callback=NULL in IO/child/inotify/defer event sources, too
Also, document this functionality more prominently, including with a
reference from sd_event_exit().

This is mostly to make things complete, as previously we supported NULL
callbacks only in _add_time() and _add_signal(). However, I think this
makes snese for IO event sources too (think: when some fd such as a pipe
end sees SIGHUP or so, exit), as well as defer or post event sources (i.e. exit
once we got nothing else to do). This also adds support for inotify
event sources, simply to complete things (I can't see the immediate use,
but maybe someone else comes up with it).

The only event source type that doesn't allow callback=NULL now are exit
callbacks, but for them they make little sense, as the event loop is
exiting then anyway.
2020-10-07 09:40:16 +02:00
Lennart Poettering
bac0bfc1d0 udev-util: make use of sd-event's NULL callback support 2020-10-07 09:40:12 +02:00
Lennart Poettering
463f9ce3bc test: add test that validates that PTR_TO_INT(INT_TO_PTR()) covers whole int range 2020-10-07 09:40:09 +02:00
Lennart Poettering
ccaa30c199 socket-proxy: port to new sd_event_source_set_exit_on_failure() API 2020-10-07 09:40:05 +02:00
Lennart Poettering
76c59537f3 socket-proxy: close correct fd, log at right log level 2020-10-07 09:40:02 +02:00
Lennart Poettering
647f2ee259 man: add docs for sd_event_source_set_exit_on_failure() 2020-10-07 09:39:39 +02:00
Lennart Poettering
b778cba4bf sd-event: optionally, if an event source fails, exit the event loop
Currently, if an event source callback returns an error, we'll disable
the event source and continue. This adds a per-event source flag that if
turned on goes further: the event loop is also exited, propagating the
error code.

This is inspired by some patterns repeatedly seen in #15206.

The idea is that event sources that server the "primary" function of a
program are marked like this, so that if they fail the failure is
instantly propagated and terminates the program.
2020-10-07 09:38:41 +02:00
Lennart Poettering
612ebf6c91 pager: set $LESSSECURE whenver we invoke a pager
Some extra safety when invoked via "sudo". With this we address a
genuine design flaw of sudo, and we shouldn't need to deal with this.
But it's still a good idea to disable this surface given how exotic it
is.

Prompted by #5666
2020-10-07 09:23:07 +02:00
Yu Watanabe
ab582fda48
Merge pull request #17240 from yuwata/network-cleanup
network: several cleanups and fix IPv4DAD and IP Masqurade
2020-10-07 07:42:40 +09:00
Marco Wang
ee85122987 boot/efi: Explicitly specify void in parameter list
Functions that accept no arguments should be
explicitly declared a void parameter in their parameter list.

Signed-off-by: Marco Wang <m.aesophor@gmail.com>
2020-10-06 22:29:57 +02:00
Yu Watanabe
66493453b3 test-network: also remove IPv6 rules 2020-10-07 03:23:27 +09:00
Yu Watanabe
713bfdaa6c test-network: add a missing netdev in the list 2020-10-07 03:23:27 +09:00
Yu Watanabe
47f8411249 test-network: disable RA in test_sriov
We usually disable IPv6AcceptRA= if the test does not require any
dynamic address configuration, as it makes slightly slow down the test.

C.f. 491b79aeac.
2020-10-07 03:23:27 +09:00
Yu Watanabe
5cf52d90a9 test-network: add missing file in the list 2020-10-07 03:23:27 +09:00
Yu Watanabe
6dcc637574 test-network: drop duplicated address 2020-10-07 03:23:27 +09:00
Yu Watanabe
13ffa39f8e network: rename network_verify_xxx() -> network_drop_invalid_xxx()
As 'verify' implies a boolean result.
2020-10-07 03:22:03 +09:00
Yu Watanabe
494b6b43cb network: fix masquerade setting logic
Previously, address_establish() took Address object stored in Network
object. And address_release() took Address object stored in Link
object. Thus, address_release() always did nothing.
2020-10-07 03:13:26 +09:00
Yu Watanabe
cd1caf30c0 network: always use RT_SCOPE_HOST for IPv4 loopback addresses
For IPv6 case, use RT_SCOPE_HOST only when scope is not explicitly specified.
2020-10-07 03:13:18 +09:00
Yu Watanabe
d93d655c40 network: update MAC address in IPv4 ACD clients
When the MAC address of a link is updated, an address on the link may
be under checking address duplication. Or, (currently such code is not
implemented yet, but) address duplication check may be restarted later.
For that case, the IPv4 ACD clients must use the new updated MAC address.
2020-10-07 02:59:34 +09:00
Yu Watanabe
490ccbd5e5 network: configure IPv4 DAD per link address
Previously, IPv4 DAD is configured in each Address object stored in
Network object. If a .network file matches multipe links, then it causes
an assertion. To prevent it, now IPv4 DAD is configured in each Address
object belogs to Link object.
2020-10-07 02:57:58 +09:00
Yu Watanabe
693ec5ca83 network: constify one argument 2020-10-07 02:57:54 +09:00
Yu Watanabe
cde1f0e8fc network: introduce address_copy() 2020-10-07 02:54:01 +09:00
Yu Watanabe
eaff204f09 network: do not update Address::flags in address_configure() 2020-10-07 02:50:51 +09:00
Yu Watanabe
f5ee7d74af network: fix indentation 2020-10-07 02:50:51 +09:00
Yu Watanabe
4cf8500067 network: use sd_event stored in Manager 2020-10-07 02:50:51 +09:00
Yu Watanabe
2ffd6d73f9 network: check feature is enabled in xxx_configure() 2020-10-07 02:50:51 +09:00
Yu Watanabe
51f5dfd8ba network: move link_enumerate_ipv6_tentative_addresses() 2020-10-07 02:50:51 +09:00
Yu Watanabe
acc9fc2f51 network: drop unused function 2020-10-07 02:50:51 +09:00
Yu Watanabe
5e0534f1c1 network: move sysctl related functions to networkd-sysctl.c 2020-10-07 02:50:51 +09:00