Yu Watanabe
2cd6b9326c
network: move LinkOperationalState and relevant functions to network-util.[ch]
2019-03-13 14:28:38 +09:00
Yu Watanabe
4ddbf08cfd
test-network: wait more and fix wrong operational state
...
Closes #11977 .
2019-03-13 14:27:39 +09:00
Yu Watanabe
ca66b69d5b
bash-completion: also suggest units in reloading or activating
...
Closes #11942 .
2019-03-12 11:25:26 +01:00
Yu Watanabe
1f682e243f
udev: fix memleak in 'udevadm trigger --settle'
...
Fixes #11966 .
2019-03-12 09:15:02 +01:00
Yu Watanabe
7905e6d70e
test: wait for a while active state of .device is updated
2019-03-12 09:49:58 +09:00
Yu Watanabe
40769ccc73
libudev: use device_get_seqnum() and device_get_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
91bd2c349b
login: use device_is_in_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
a7f95575b1
network: use device_get_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
a7395c867e
core/device: use device_get_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
a12b87f59c
udevadm-test: check action string earlier
...
The string will be checked later in device_new_from_synthetic_event(),
but let's check it earlier in parse_argv().
2019-03-12 03:49:53 +09:00
Yu Watanabe
2c18a85400
udevadm: use device_get_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
7a2093236b
udev: refuse to modify SEQNUM by udev rules
2019-03-12 03:49:53 +09:00
Yu Watanabe
d4d690facd
udevd: use device_get_action() and device_get_seqnum()
2019-03-12 03:49:53 +09:00
Yu Watanabe
a707c65b70
util: introduce device_for_action()
...
It will be used in later commits.
2019-03-12 03:49:53 +09:00
Yu Watanabe
5ebd3fc3c1
sd-device: store parsed ACTION= and SEQNUM= udev properties
2019-03-12 03:49:53 +09:00
Yu Watanabe
7f45d738a6
test-network: add tests for issue #11921
2019-03-11 15:29:19 +01:00
Yu Watanabe
3a6797f19f
machinectl: do not format size if freed disk space is "-1"
...
Closes #11941 .
2019-03-11 14:04:16 +01:00
Yu Watanabe
a289dfd69b
journal-remote: do not request Content-Length if Transfer-Encoding is chunked
...
This fixes a bug introduced by 7fdb237f54 .
Closes #11571 .
2019-03-11 13:52:10 +01:00
Yu Watanabe
0a8321d33c
import: do not try to set selinux related attributes if selinux is disabled
...
Closes #11940 .
2019-03-11 10:59:13 +01:00
Yu Watanabe
7750b79695
network: update logs
2019-03-11 08:10:50 +01:00
Yu Watanabe
49942d6b1e
timedate: fix emitted value when ntp client is enabled/disabled ( #11951 )
...
This fixes a regression originall caused by cf3872bd2 and
triggered by b4356b5720 .
Fixes #11944
2019-03-10 20:44:21 +01:00
Yu Watanabe
b459700b98
core: simplify and check validity of paths for RequiresMountsFor=
...
Prompted by #11910 .
2019-03-08 15:48:34 +01:00
Yu Watanabe
8c8b67ffec
TODO: update
2019-03-07 17:28:33 +09:00
Yu Watanabe
1ec38b8574
test: add test for ID_RENAMING= udev property handling by pid1
2019-03-07 17:28:19 +09:00
Yu Watanabe
cd648ae195
man: mention possible actions supported by "udevadm trigger"
2019-03-07 15:19:02 +09:00
Yu Watanabe
dcee4a134c
udevadm trigger: make --action option support all possible actions
...
This also make udevadm abort operations if invalid action is specified.
2019-03-07 15:19:02 +09:00
Yu Watanabe
08caaee0ac
sd-device: move device_action_from_string() and friends to device-private.h
2019-03-07 15:18:49 +09:00
Yu Watanabe
2efa43dc4a
core/device: make devices with ID_RENAMING= property be considered not ready
2019-03-07 12:54:58 +09:00
Yu Watanabe
39a15c8a8d
udev: run programs in the specified order
...
This fixes bugs introduced by 29448498c7
and d838e14515 .
Previously, RUN and SECLABEL keys are stored in udev_list with its unique
flag is false. If the flag is false, then udev_list is just a linked
list and new entries are always added in the last.
So, we should use OrderedHashmap instead of Hashmap.
Fixes #11368 .
2019-03-05 09:27:29 +01:00
Yu Watanabe
23041689ca
dhcp: refuse to configure DHCP IAID if the interface is under renaming
...
systemd-networkd itself does not start dhcp client, but the code
may be used in other projects. So, check that the interface is under
renaming or not.
2019-03-05 12:48:26 +09:00
Yu Watanabe
299ad32d48
network: do not configure interfaces under renaming
2019-03-05 10:33:42 +09:00
Yu Watanabe
90ba130f00
util: introduce device_is_renaming()
...
It will be used in the later commit.
2019-03-05 10:33:41 +09:00
Yu Watanabe
30de2b89d1
network: always drop configs when interface is renamed
...
Before the renaming, wrong .network file may be assigned to the link.
So, let's always drop link configuration.
2019-03-05 10:33:27 +09:00
Yu Watanabe
a4055a608e
udev: set ID_RENAMING property when interface renaming is requested
...
And drop the property on the corresponding 'move' uevent.
2019-03-05 10:31:35 +09:00
Yu Watanabe
6d0fdf4513
udev: do not read UdevEvent object before checking it is non-NULL
2019-03-05 10:31:20 +09:00
Yu Watanabe
589384be8d
udev: drop unnecessary copy of new interface name
2019-03-05 10:02:09 +09:00
Yu Watanabe
4d64309955
netlink: check new interface name is valid or not before sending request
2019-03-05 10:02:09 +09:00
Yu Watanabe
305a285092
systemctl: format LogExtraFields= in 'show' command
2019-03-04 23:45:07 +09:00
Yu Watanabe
4c787df72f
systemctl: format BindPaths= or TemporaryFileSystems= in 'show' command
2019-03-04 23:45:07 +09:00
Yu Watanabe
04749e4003
systemctl: print RestrictAddressFamilies= in 'show' command
2019-03-04 23:45:07 +09:00
Yu Watanabe
48d3358db1
systemctl: show nothing if no LoadError=
2019-03-04 23:45:07 +09:00
Yu Watanabe
56c6b69007
systemctl: format IPIngressBytes= or friends nicely
2019-03-04 23:45:07 +09:00
Yu Watanabe
9c1f946566
systemctl: show IPAddressAllow= and IPAddressDeny= in 'show' command
2019-03-04 23:45:07 +09:00
Yu Watanabe
9201eea137
test: add tests for test_in_addr_prefix_to_string()
2019-03-04 23:45:07 +09:00
Yu Watanabe
146cf7f05b
test: move tests for in_addr_prefix_from_string()
2019-03-04 23:45:07 +09:00
Yu Watanabe
d9143dac3e
util: introduce in_addr_prefix_to_string()
2019-03-04 23:45:07 +09:00
Yu Watanabe
81260be12e
util: use _cleanup_ attributes
2019-03-04 23:45:07 +09:00
Yu Watanabe
a672f4fe8d
core: fix received size of signal or status size
...
sd_bus_message_read_array() returns size of array in bytes, not number
of elements.
This also convert int to int32_t, as the dbus type 'i' is int32_t.
2019-03-04 23:44:29 +09:00
Yu Watanabe
4a22071201
systemctl: show SuccessExitStatus= and friends
2019-03-04 23:35:56 +09:00
Yu Watanabe
8e066ef316
systemctl: use streq() if arguments must be non-NULL
2019-03-04 23:35:56 +09:00
Yu Watanabe
a3ddd4571d
systemctl: do not show negative values in {Success,Failure}ActionExitStatus=
2019-03-04 23:35:56 +09:00
Yu Watanabe
102b021460
bus-util: drop unnecessary re-formatting
2019-03-04 23:35:46 +09:00
Yu Watanabe
55ac7b6314
fuzz-dhcp6-client: avoid assertion failure on samples which dont fit in pipe
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11584 .
2019-03-04 12:04:09 +01:00
Yu Watanabe
59c1546b45
test: add tests for log_syntax()
2019-03-04 15:28:32 +09:00
Yu Watanabe
ee96382fdb
log: make log_syntax() assign correct errno and show valid error cause
2019-03-04 15:18:06 +09:00
Yu Watanabe
26bf9c302d
test-network: add tests for address pool
2019-03-01 16:34:55 +09:00
Yu Watanabe
b085cd3786
network: generate addresses from pool with larger prefixlen
2019-03-01 16:34:55 +09:00
Yu Watanabe
304e7e9d53
network: generate random prefix from address pool
...
Fixes #9955 .
2019-03-01 16:34:44 +09:00
Yu Watanabe
e762ea7481
test: add tests for in_addr_random_prefix()
2019-03-01 16:28:20 +09:00
Yu Watanabe
c5236acdd7
util: introduce in_addr_random_prefix()
2019-03-01 16:27:51 +09:00
Yu Watanabe
7e43ebfbf9
network: propagate error from in_addr_is_null()
2019-03-01 15:55:55 +09:00
Yu Watanabe
4e68898ed7
man: mention Address= can be specified once in [Address] section
2019-03-01 15:52:12 +09:00
Yu Watanabe
e6ef3a130f
man: mention limit about prefix length when null address is specified to Address=
2019-03-01 15:52:12 +09:00
Yu Watanabe
c9207ff3a4
network: check prefixlen when null address is specified to Address=
2019-03-01 15:52:12 +09:00
Yu Watanabe
f2efbeafb8
network: use fd00::/8 for ipv6 address pool
...
fc00::/8 may be used in the future. See rfc4193.
2019-03-01 15:52:12 +09:00
Yu Watanabe
198afaab90
network: make address_pool_new() static
2019-03-01 15:52:12 +09:00
Yu Watanabe
358fb6862b
fuzz: do not assume the existence of /sys/class/net/lo
...
Hopefully fixes oss-fuzz#13440.
2019-02-28 10:38:16 +01:00
Yu Watanabe
2850cd40ee
network: wrap long lines
2019-02-28 10:57:20 +09:00
Yu Watanabe
33680b0a26
network: simplify config_parse_lifetime()
2019-02-28 10:56:33 +09:00
Yu Watanabe
4aa4c4b0f4
network: avoid address section freed
...
Otherwise, if HomeAddress= or friends are specified at the first line of
a section, then its assignment will be ignored.
2019-02-28 10:54:20 +09:00
Yu Watanabe
f205a92a5c
network: cleanup logging in route related config parsers
2019-02-28 10:39:14 +09:00
Yu Watanabe
01d4e7323c
network: do not override previously specified family
2019-02-28 10:37:58 +09:00
Yu Watanabe
af3b1498c6
test-network: add testcase for #1850
2019-02-28 10:34:27 +09:00
Yu Watanabe
4912ab7774
network: enable GatewayOnLink= if Gateway= without static address configured
...
And warn about that.
But this only done if GatewayOnLink= is not specified. When it is
explicitly disabled, then the flag will not be set.
2019-02-28 10:34:21 +09:00
Yu Watanabe
54901fd222
network: save GatewayOnLink= value as tristate in Route
...
This should not change any behavior. But used in the later commit.
2019-02-28 10:16:55 +09:00
Yu Watanabe
4bec2f237b
network: relax the .network file check
...
Previously, if a .networ file contains invalid [Address] or [Route]
section, then the file is completely dropped. This makes networkd
just drops invalid sections.
2019-02-28 10:01:56 +09:00
Yu Watanabe
9cb8c55934
network: rename GatewayOnlink= to GatewayOnLink=
...
But still GatewayOnlink= is supported for backward compatibility.
2019-02-28 10:00:22 +09:00
Yu Watanabe
b677774d69
test-network: add testcase for issue #11280
2019-02-27 19:24:13 +09:00
Yu Watanabe
703bc7a2a6
test-network: drop relevant ip routing policy rules before testing
2019-02-27 19:23:46 +09:00
Yu Watanabe
80be3de31f
network: fix error code in log
2019-02-27 16:48:19 +09:00
Yu Watanabe
87d8a4dee8
network: merge conditions and use FLAGS_SET() macro
2019-02-27 16:48:19 +09:00
Yu Watanabe
e8c9b5b06f
network: make ndisc_router_process_options() propagate error
...
And its caller ignore the error.
2019-02-27 16:48:19 +09:00
Yu Watanabe
031fb59a98
network: do not remove rule when it is requested by existing links
...
Otherwise, the first link once removes all saved rules in the foreign
rule database, and the second or later links create again...
2019-02-27 10:59:10 +09:00
Yu Watanabe
92cd00b974
network: remove routing policy rule from foreign rule database when it is removed
...
Previously, When the first link configures rules, it removes all saved
rules, which were configured by networkd previously, in the foreign rule
database, but the rules themselves are still in the database.
Thus, when the second or later link configures rules, it errnously
treats the rules already exist.
This is the root of issue #11280 .
This removes rules from the foreign database when they are removed.
Fixes #11280 .
2019-02-27 10:58:09 +09:00
Yu Watanabe
72b7f1b976
test-network: add test for MTUBytes= in vlan or macvlan devices
2019-02-27 10:05:02 +09:00
Yu Watanabe
40288ecea1
network: bump mtu if stacked vlan or macvlan requests larger size
...
Closes #5972 .
2019-02-27 10:04:56 +09:00
Yu Watanabe
10f6188b67
fuzz: add a sample for fuzz-udev-database
2019-02-26 13:28:30 +09:00
Yu Watanabe
4c9024c2cf
fuzz: add fuzzer for udev database
2019-02-26 13:10:31 +09:00
Yu Watanabe
b07d0f2a85
sd-device: split device_read_db_internal() into two part
...
The new device_read_db_internal_filename() will be used by a fuzzer.
2019-02-26 12:55:43 +09:00
Yu Watanabe
102bc043bb
network: assign Network::manager when it is listed to the manager object.
...
Now Network::manager is not necessary during parsing configs.
C.f. 838b2f7a30 .
2019-02-26 10:06:27 +09:00
Yu Watanabe
cebe12571d
network: make resolving NetDev names delayed and moved to network_verify()
...
And before resolving NetDev names, check conditions in .network,
and if they do not match the system environment, drop the network
unit earlier.
Fixes #4211 .
2019-02-26 10:06:23 +09:00
Yu Watanabe
a6779fecd9
network: add debug log when conditions do not match system environment
2019-02-26 09:58:33 +09:00
Yu Watanabe
051f39c227
tools: check all directives even if it detects non-updated files
2019-02-25 12:41:11 +09:00
Yu Watanabe
810d43a8e8
tools: update check-directives.sh to support fuzz-link-parser
2019-02-25 12:41:11 +09:00
Yu Watanabe
eac31d708f
fuzz: add directives.link and 99-default.link for fuzz-link-parser
...
Also adds several reproducers of errors fixed in earlier commits.
2019-02-25 12:40:42 +09:00
Yu Watanabe
a378400b3f
fuzz: add fuzzer for parsing .link files
...
This also renames load_link() to link_load_one()
2019-02-25 12:35:51 +09:00
Yu Watanabe
7cd1f60df0
fuzz: use fflush() and drop unnecessary rewind()
2019-02-25 12:35:51 +09:00
Yu Watanabe
84fb56d396
udev/ethtool: fix error detection of ethtool_link_mode_bit_from_string()
2019-02-25 12:35:40 +09:00
Yu Watanabe
391f6bc1db
udev: fix memleak in conditions for .link file
2019-02-25 11:57:14 +09:00
Yu Watanabe
176d9c0e11
udev/net: drop .link files earlier when their conditions do not match system environment
2019-02-25 11:54:50 +09:00