Yu Watanabe
bafa964144
network: read link specific sysctl value
...
This introduce link_sysctl_ipv6_enabled() and replaces
manager_sysctl_ipv6_enabled() with it.
2019-06-15 14:56:42 +02:00
Yu Watanabe
c111cd9834
NEWS: add more hint about MACAddressPolicy= change
...
C.f. https://bugzilla.suse.com/show_bug.cgi?id=1136600
2019-06-14 16:19:14 +02:00
Yu Watanabe
4c2459c692
test-network: drop redundant operstate checking
2019-06-14 16:50:07 +09:00
Yu Watanabe
df7f9afaa7
test-network: replace check_link_exists() with wait_online()
2019-06-14 16:49:39 +09:00
Yu Watanabe
01943d43f4
test-network: explicitly set sleep time
2019-06-14 16:47:40 +09:00
Yu Watanabe
5239d7b34e
test-network: suppress error message in cleanup process
2019-06-14 16:45:50 +09:00
Yu Watanabe
1285edf39c
test-network: add test for ConfigureWithoutCarrier=
2019-06-14 05:25:35 +09:00
Yu Watanabe
463797c104
network: skip to check dynamic addresses when ConfigureWithoutCarrier=yes
...
Otherwise, the interface cannot be in "configured" state, as ipv6 link local
addressing is enabled by default. Note that even if ConfigureWithoutCarrier=
is set, all dynamic configurations are checked when the interface has
carrier.
2019-06-14 05:25:35 +09:00
Yu Watanabe
5ca5048249
networkctl: fix use of uninitialized value
2019-06-13 10:13:57 +02:00
Yu Watanabe
9c5e1c24ad
Merge pull request #12777 from yuwata/libudev-enumerate-issue-12776
...
libudev: rescan devices when filter is updated
2019-06-13 07:45:01 +09:00
Yu Watanabe
538bdb48d8
libudev: hide definition of struct udev_device
2019-06-12 23:59:08 +09:00
Yu Watanabe
56fa3682b9
libudev: rescan devices when filter is updated
...
Fixes #12776 .
2019-06-12 23:59:08 +09:00
Yu Watanabe
c01130824f
libudev: re-implement libudev-list with LIST and hashmap
2019-06-12 23:59:02 +09:00
Yu Watanabe
dcf557f7b0
libudev: hide definition of struct udev_list from other libudev components
...
In the later commit, udev_list will be just a wrapper of hashmap or LIST.
So, allocating udev_list does not increase much cost.
2019-06-12 23:55:26 +09:00
Yu Watanabe
337405d439
libudev: drop unused variable
2019-06-12 15:18:05 +09:00
Yu Watanabe
e5dd7bc25d
Merge pull request #12774 from yuwata/network-ignore-ipv6-settings-when-sysctl-disable-ipv6
...
network: ignore ipv6 settings when sysctl disable ipv6
2019-06-12 14:46:00 +09:00
Yu Watanabe
4933b97d59
test-network: add more test cases when ipv6 is disabled
2019-06-12 11:04:10 +09:00
Yu Watanabe
b0ab85a2e4
network: ignore requested ipv6 fdb entry when ipv6 is disabled by sysctl
2019-06-12 11:04:06 +09:00
Yu Watanabe
7ef7e5509b
network: ignore requested ipv6 routing policy rule when ipv6 is disabled by sysctl
2019-06-12 11:03:37 +09:00
Yu Watanabe
c442331750
network: ignore requested ipv6 route when ipv6 is disabled by sysctl
2019-06-12 11:03:08 +09:00
Yu Watanabe
54a1a535bd
network: ignore requested ipv6 addresses when ipv6 is disabled by sysctl
2019-06-12 11:02:33 +09:00
Yu Watanabe
d03073ddcd
network: assign new DHCP address before removing old lease address
...
Closes #12676 .
2019-06-07 16:22:00 +09:00
Yu Watanabe
3ab7ed3f12
network: ignore callback calls when link is in failed state
2019-06-07 16:22:00 +09:00
Yu Watanabe
a2f684904c
network: drop unnecessary link_enter_failed() calls
...
As the function called soon later anyway.
2019-06-07 16:22:00 +09:00
Yu Watanabe
448aaf9f43
network: check earlier the existence of lifetime in lease
2019-06-07 16:22:00 +09:00
Yu Watanabe
1590dfa4a0
network: make all failures in route configuration fatal
2019-06-07 16:22:00 +09:00
Yu Watanabe
1f3bb9df2f
Merge pull request #12756 from cdown/uninit
...
a couple of correctness fixups
2019-06-07 15:58:30 +09:00
Yu Watanabe
1e498853a3
test-network: add tests for KeepConfiguration=
2019-06-06 23:36:27 +09:00
Yu Watanabe
c98d78d32a
man: add documentation about KeepConfiguration
2019-06-06 22:50:29 +09:00
Yu Watanabe
db51778f85
network: make KeepConfiguration=static drop DHCP addresses and routes
...
Also, KeepConfiguration=dhcp drops static foreign addresses and routes.
2019-06-06 22:50:29 +09:00
Yu Watanabe
95355a281c
network: add KeepConfiguration=dhcp-on-stop
...
The option prevents to drop lease address on stop.
By setting this, we can safely restart networkd.
2019-06-06 22:50:29 +09:00
Yu Watanabe
f0c53dfe3c
Merge pull request #12748 from keszybz/modernize-networkd-tests-style
...
Modernize networkd-tests.py style
2019-06-06 22:23:09 +09:00
Yu Watanabe
042526868a
Merge pull request #12508 from keszybz/no-root-checks
...
Drop many root checks
2019-06-06 21:31:19 +09:00
Yu Watanabe
9ee92e7ed8
network: check stored object is euivalent to what we want to remove
...
When object A is stored in Manager::rules and B is in ::rules_foreign,
and compare function for the object cannot distinguish them,
then freeing A causes B to be removed from rules_foreign or vice versa.
Hopefully fixes #12731 .
2019-06-06 00:45:46 +09:00
Yu Watanabe
d90f4f7d91
test-network: do not directly compare two results of "ip address"
...
As it contains lifetime of the address.
2019-06-05 19:42:12 +09:00
Yu Watanabe
99058cd66a
udev: propagate errors in udev_event_execute_rules()
...
And do not set initialized flag to the device.
2019-06-05 10:44:17 +02:00
Yu Watanabe
e16ffe7954
test-network: do not allow addresses in tentative state
2019-06-05 16:35:20 +09:00
Yu Watanabe
277cb7631e
Merge pull request #12741 from keszybz/bpf-firewall-warning
...
Silence BPF firewall warning when not useful
2019-06-05 04:01:44 +09:00
Yu Watanabe
e8b88eb94c
Merge pull request #12737 from keszybz/meson-man-nspawn
...
meson: escape dots in man/man helper
2019-06-05 02:45:39 +09:00
Yu Watanabe
56dacb8d2e
Merge pull request #12661 from mrc0mmand/debug-journalctl-flush
...
journal: disable varlink timeout for journalctl --flush or friends
2019-06-05 00:46:29 +09:00
Yu Watanabe
0bd3c2102f
journalctl: make 'journalctl --flush' or friends not fail with varlink timeout
...
Closes #12570 .
2019-06-04 23:27:26 +09:00
Yu Watanabe
ca866a32fb
bash-completion: support "networkctl delete"
2019-06-04 12:00:49 +02:00
Yu Watanabe
f2083c718b
journalctl: mention --smart-relinquish-var in log message
2019-06-04 17:04:35 +09:00
Yu Watanabe
17087340c3
journalctl: fix error cause in log message
...
If varlink_call() returns negative errno, then `error` is null.
2019-06-04 17:03:36 +09:00
Yu Watanabe
9f08a578a8
network: remove unused argument in routing_policy_rule_configure()
2019-06-04 16:23:18 +09:00
Yu Watanabe
d26267ddf1
network: fix double free on error path
2019-06-04 16:23:18 +09:00
Yu Watanabe
3681d63935
network: fix UBSAN issue
...
Closes #12724 .
2019-06-04 09:12:44 +02:00
Yu Watanabe
38b9af6154
networkctl: re-cast value stored in Set with INT_TO_PTR()
2019-06-04 09:08:55 +02:00
Yu Watanabe
3c2c30ebab
Merge pull request #12708 from yuwata/test-network-networkctl-tests
...
udevadm: add --wait-for-initialization option and use it in systemd-networkd-tests.py
2019-06-04 03:58:47 +09:00
Yu Watanabe
78690bb5d0
test-network: disable SystemCallFilter= when *SAN is enabled
2019-06-04 01:29:28 +09:00
Yu Watanabe
6d5b4efed2
test-network: add test for MTU field of 'networkctl status'
2019-06-04 01:29:28 +09:00
Yu Watanabe
bee692fd38
test-network: add tests for "networkctl delete"
2019-06-04 01:29:28 +09:00
Yu Watanabe
1ca44d7dfd
test-network: move networkctl related tests to NetworkctlTests class
2019-06-04 01:29:24 +09:00
Yu Watanabe
ae760f4b16
udevadm: add --wait-for-initialization option to "udevadm info"
2019-06-04 01:28:30 +09:00
Yu Watanabe
1b47436e0e
util: make device_wait_for_initialization() optionally takes timeout value
2019-06-04 01:19:43 +09:00
Yu Watanabe
f822c5d59e
util: make argument "subsystem" in device_wait_for_initialization() optional
2019-06-04 01:19:43 +09:00
Yu Watanabe
81914d9f13
networkctl: drop unnecessary use of table_add_cell_full()
2019-06-03 16:43:18 +09:00
Yu Watanabe
d7aee41db3
udev: check formatting of attribute or value earlier
2019-06-03 08:35:33 +09:00
Yu Watanabe
1448820aad
udev: evaluate formatting in RUN= key earlier
...
Closes #12291 .
2019-06-03 08:35:33 +09:00
Yu Watanabe
7280153364
udev: use delete_trailing_chars() at one more place
2019-06-03 08:35:33 +09:00
Yu Watanabe
1b65f1ebc3
udev: replace xsprintf() + strpcpy() by strpcpyf()
2019-06-03 08:35:33 +09:00
Yu Watanabe
ce4f94b8e9
udev: make parser for attribute of $result harder
2019-06-03 08:35:33 +09:00
Yu Watanabe
13cd553f91
udev: split udev_event_apply_format() into small pieces
...
Also, this makes the function refuse invalid formatting and
propagate error in substituing variable.
2019-06-03 08:35:08 +09:00
Yu Watanabe
3c209d6070
udev: comment that $tempnode and $sysfs formats are deprecated
2019-06-02 14:15:32 +09:00
Yu Watanabe
ef315adaa4
udev: pass format type to udev_event_subst_format()
2019-06-02 14:15:32 +09:00
Yu Watanabe
7e9c23dd19
udev: rename enum subst_type -> FormatSubstitutionType
2019-06-02 14:15:32 +09:00
Yu Watanabe
25de7aa7b9
udev: modernize udev-rules.c
...
This does the following:
- rename enum udev_builtin_cmd -> UdevBuiltinCmd
- rename struct udev_builtin -> UdevBuiltin
- move type definitions to udev-rules.h
- move prototypes of functions defined in udev-rules.c to udev-rules.h
- drop to use strbuf
- propagate critical errors in applying rules,
- drop limitation for number of tokens per line.
2019-06-02 14:15:26 +09:00
Yu Watanabe
335dd8ba13
networkctl: show link bit rates
2019-06-01 10:24:47 +09:00
Yu Watanabe
a879e1a46e
network: monitor link bit rates
2019-06-01 10:24:47 +09:00
Yu Watanabe
94a58cc1f9
bash-completion: support --stats/-s option of networkctl
2019-06-01 10:24:47 +09:00
Yu Watanabe
a459b24f7e
networkctl: optionally show link statistics
2019-06-01 10:24:47 +09:00
Yu Watanabe
c095e5b02b
netlink: set attribute size of IFLA_STATS and IFLA_STATS64
2019-06-01 10:24:47 +09:00
Yu Watanabe
c06ff86e25
networkctl: do not show zero maximum MTU
2019-05-31 10:55:07 +02:00
Yu Watanabe
72917fcc65
test-network: show systemd-networkd.service
...
As there may exist some other drop-in configs.
2019-05-31 13:58:27 +09:00
Yu Watanabe
d4fda2a55c
test-network: stop service before editing unit file
2019-05-31 09:52:48 +09:00
Yu Watanabe
fa4c6095d7
test-network: add --lsan-options option
2019-05-31 08:52:27 +09:00
Yu Watanabe
9e90465539
Merge pull request #12705 from keszybz/varlink-json-fix-and-two-cleanups
...
Varlink json fix and two cleanups
2019-05-31 08:28:37 +09:00
Yu Watanabe
cfa0ce187f
Merge pull request #12699 from yuwata/test-network-argparse
...
test-network: make path to networkd or friends configurable
2019-05-31 02:33:10 +09:00
Yu Watanabe
7e4831d296
util: introduce strnpcpy() and strnscpy()
2019-05-30 21:08:51 +09:00
Yu Watanabe
961189af2a
util: introduce PTR_TO_MODE and MODE_TO_PTR macros
2019-05-30 21:08:51 +09:00
Yu Watanabe
e2835111dd
networkctl: fix memleak
...
Closes #12701 .
2019-05-30 20:58:36 +09:00
Yu Watanabe
94c0312294
test-network: make the test take ASAN and UBSAN options
2019-05-30 20:51:35 +09:00
Yu Watanabe
9c1ae4844e
test-network: make path to networkd or friends configurable
2019-05-30 20:49:56 +09:00
Yu Watanabe
a0267b30f8
nspawn: also support ifindex when specifying network interface
2019-05-30 11:04:05 +02:00
Yu Watanabe
ea082dda71
dhcp4: use memdup_suffix0() instead of strndup() for binary data
...
C.f. ac0a94f743 .
Fixes #12693 .
2019-05-30 09:55:57 +02:00
Yu Watanabe
53c32c2b9b
test-network: bump time limit for wait_address()
...
Maximum time interval of DHCPv4 request is 63sec.
So, setting 100sec is enough.
2019-05-29 12:37:41 +02:00
Yu Watanabe
488d0ba10a
man: re-indent systemd.netdev.xml
2019-05-29 17:17:08 +09:00
Yu Watanabe
931d11057c
test-network: drop 25-nlmon.network
2019-05-29 17:07:06 +09:00
Yu Watanabe
518a66ec08
tree-wide: replace if_indextoname() with format_ifname()
2019-05-29 14:21:19 +09:00
Yu Watanabe
7f686722f7
util: introduce format_ifname()
2019-05-29 14:21:19 +09:00
Yu Watanabe
658e910640
networkctl: use Table for 'lldp' command
2019-05-29 14:21:19 +09:00
Yu Watanabe
0232beed9c
networkctl: use Table for 'label' command
2019-05-29 14:21:19 +09:00
Yu Watanabe
98d5bef3c5
networkctl: use Table for 'status' command
2019-05-29 14:21:19 +09:00
Yu Watanabe
ff7c88a2f3
networkctl: use Table for 'list' command
2019-05-29 14:21:19 +09:00
Yu Watanabe
8390d39165
table: add TABLE_IFINDEX type
2019-05-29 14:21:19 +09:00
Yu Watanabe
d553832698
table: add more basic types
2019-05-29 14:21:19 +09:00
Yu Watanabe
5896e03c6f
table: add teble_add_string_cell()
2019-05-29 14:21:19 +09:00
Yu Watanabe
f1bc253efa
Merge pull request #12687 from yuwata/parse_ifindex_or_ifname
...
util: introduce parse_ifindex_or_ifname() and use it in networkctl and resolvectl
2019-05-29 14:20:36 +09:00
Yu Watanabe
4bddccc684
networkctl: use parse_ifindex_or_ifname()
2019-05-29 13:22:01 +09:00
Yu Watanabe
8e5385b485
resolvectl: use parse_ifindex_or_ifname()
2019-05-29 13:22:01 +09:00