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
Lennart Poettering
e5f1b999eb
network: don't fail on various config parse errors
...
We typically don't fail on config parse errors (to maximize compat),
let's not do this in these cases either.
2020-09-09 23:43:16 +02:00
Lennart Poettering
40eb1b0ae8
tree-wide: prefer AF_xyz over PF_xyz
...
This really doesn't matter given that AF_xyz and PF_xyz are equivalent
in all ways, but we almost always use AF_xyz, hence stick to it
universally and convert the remaining PF_ to AF_
2020-09-09 23:42:55 +02:00
Lennart Poettering
244d9793ee
Merge pull request #16984 from yuwata/make-log_xxx_error-void
...
Make log_xxx_error() or friends return void
2020-09-09 16:28:51 +02: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
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
Lennart Poettering
26c65933ba
Merge pull request #16978 from keszybz/two-variable-reduction-patches
...
Two variable reduction patches
2020-09-08 17:13:21 +02:00
Zbigniew Jędrzejewski-Szmek
a9aa8deb29
Merge pull request #16618 from yuwata/network-ipv6token-prefixstable
...
network: make prefixstable mode of IPv6Token= can be applied any received prefixes
2020-09-08 13:36:27 +02:00
Zbigniew Jędrzejewski-Szmek
90e74a66e6
tree-wide: define iterator inside of the macro
2020-09-08 12:14:05 +02: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
Lennart Poettering
e825610499
Merge pull request #16880 from yuwata/network-dhcp4-cleanups
...
network: DHCPv4 cleanups
2020-09-04 15:54:27 +02:00
Zbigniew Jędrzejewski-Szmek
459c41b9e2
Merge pull request #16881 from yuwata/network-routing-policy-rule-cleanups
...
network: routing policy rule cleanups
2020-09-04 12:57:20 +02: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
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
5acf54a063
network: dhcp4: stop IPv4ACD before assigning new address
2020-09-04 09:05:34 +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
fangxiuning
6d95e7d9b2
tree-wide: drop pointless zero initialization ( #16900 )
2020-08-30 06:21:20 +09:00
Lennart Poettering
cd17bb6e71
networkd: consider any uevent other than "remove" sufficient for the network device to be ready
2020-08-28 17:45:05 +02:00
Yu Watanabe
876dc2b014
network: dhcp6: logs only new address
...
Closes #16731 .
2020-08-27 21:24:07 +02:00
Yu Watanabe
df696b1413
networkctl: label command does not take any argument
2020-08-27 16:32:13 +09:00
Zbigniew Jędrzejewski-Szmek
d521e6993d
Merge pull request #16824 from keszybz/no-such-unit-error
...
Add sd_bus_error_has_names() and use it to catch BUS_ERROR_NO_SUCH_UNIT
2020-08-25 09:16:25 +02:00
Zbigniew Jędrzejewski-Szmek
955a632971
tree-wide: use sd_bus_error_has_names() in more places
2020-08-24 19:48:26 +02:00
Clemens Gruber
f594b5feab
network: can: Fix CAN initialization
...
When introducing CAN-FD support, the .can_fd_mode was not initalized
with -1 and due to cm.mask containing the CAN_CTRLMODE_FD bit, it was
not ignored when FDMode was not configured but instead disabled.
The same thing happened when listen-only mode support was introduced.
On chips that do not support these features, this lead to an error:
can0: Failed to configure CAN link: Operation not supported
Fix it by intializing all the CAN related tristate variables
(.can_listen_only, .can_fd_mode and .can_non_iso) to -1.
2020-08-24 09:33:25 +02:00
Yu Watanabe
46b875fb80
network: do not fail if UseMTU=yes on DHCP lease lost
...
This fixes a bug introduced by 6906794dd1
.
Fixes #16768 .
2020-08-18 20:33:58 +02:00
Yu Watanabe
9b966cee43
network: wait for previous address removal before configuring static addresses
...
Fixes #16696 .
2020-08-08 12:41:03 +09:00
Yu Watanabe
b6766fb114
network: drop unnecessary bracket
2020-08-08 12:31:59 +09:00
Yu Watanabe
fb282d4e25
network: only process non-error message
2020-08-08 12:31:12 +09:00
Zbigniew Jędrzejewski-Szmek
d06bd2e785
Merge pull request #16596 from poettering/event-time-rel
...
Conflict in src/libsystemd-network/test-ndisc-rs.c fixed manually.
2020-08-04 16:07:03 +02:00
Yu Watanabe
2ac7eec3b5
network: fix use of uninitialized value
...
Follow-up for 6e537f62d7
.
2020-07-30 07:38:18 +02:00
Michael Marley
b209cff2ad
network: Fix "Unknown section 'DHCPv6PrefixDelegation'." message
...
Follow-up for 99e015e28c
2020-07-30 10:34:47 +09:00