Yu Watanabe
1a3a6309a7
network: rename gateway_from_dhcp -> gateway_from_dhcp_or_ra
...
As for IPv6 case gateway is given by RA.
2020-10-15 06:58:53 +09:00
Yu Watanabe
fe841414ef
network: read peer address, label, broadcast from rtnl message
...
Then, Address objects in Network and Link can be easily compared by
address_equal().
2020-10-13 20:30:35 +09:00
Yu Watanabe
6dd5398137
network: support IPv4 route with IPv6 gateway
2020-10-08 00:06:19 +09:00
Yu Watanabe
ad208fac73
network: also manage routes without RTA_OIF attribute
2020-10-07 15:22:10 +02: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
5e0534f1c1
network: move sysctl related functions to networkd-sysctl.c
2020-10-07 02:50:51 +09:00
Yu Watanabe
062c020fb6
network: move link_ipv6_accept_ra_enabled()
2020-10-07 02:50:50 +09:00
Yu Watanabe
093e35334d
network: header cleanup
2020-10-07 02:50:50 +09:00
Yu Watanabe
e2263711ba
network: cleanup networkd-route.h
2020-10-07 02:44:43 +09:00
Yu Watanabe
2a54a0446b
network: drop list of static routes
...
[Route] sections are managed by both LIST and Hashmap. Let's drop the
list.
2020-10-07 02:44:43 +09:00
Yu Watanabe
141318f777
network: move link_request_set_routes()
2020-10-07 02:44:42 +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
b0b9776656
network: ndisc: also remove old DNSSL or RDNSS records after an SLAAC address is ready
2020-07-29 02:05:05 +09:00
Yu Watanabe
69203fba70
network: ndisc: remove old addresses and routes after at least one SLAAC address becomes ready
...
Otherwise, the old addresses will exist in deperecated state.
2020-07-29 02:05:05 +09:00
Yu Watanabe
80b0e86084
network: make address/route_configure optionally return created Address/Route object
2020-07-29 02:05:05 +09:00
Yu Watanabe
3336e946da
network: ndisc: do not set configured flags when addresses or routes are not assigned yet
...
Just for safety.
2020-07-29 02:05:05 +09:00
Yu Watanabe
2c62149509
network: ndisc: ignore duplicated IPv6Token=
2020-07-22 20:26:11 +09:00
Yu Watanabe
92ee90af47
network: ndisc: do not store duplicated data in Set
...
The Address objects in the set generated by ndisc_router_generate_addresses()
have the equivalent prefixlen, flags, prefered lifetime.
This commit makes ndisc_router_generate_addresses() return Set of
in6_addr.
2020-07-22 20:26:05 +09:00
Yu Watanabe
f281fc1e95
tree-wide: use siphash24_compress_string() where it is applicable
2020-07-22 19:55:14 +09:00
Yu Watanabe
a8c10331b4
network: replace NDISC -> NDisc in log messages
2020-07-18 05:51:41 +09:00
Yu Watanabe
5eec0a0810
network: introduce address_exists() helper function
2020-07-18 05:51:41 +09:00
Yu Watanabe
13e8a49a58
network: ndisc: any failures in processing event make the link in failed state
...
Also adjust log levels.
2020-07-17 01:18:44 +09:00
Yu Watanabe
d96edb2c6e
network: downgrade log level in conf parsers
2020-07-17 00:40:09 +09:00
Yu Watanabe
0c816fcc7b
network: make link_request_set_nexthop() called from link_request_set_routes() or route_handler()
...
Then we can drop static_routes_ready() flag.
2020-07-15 17:15:25 +09:00
Yu Watanabe
d98c546dac
network: ndisc: split ndisc_configured flag into for addresses and routes
2020-07-15 17:15:25 +09:00
Yu Watanabe
01c344bdd4
network: ndisc: do not ignore remaining addresses
...
Follow-up for c24c83dc67
.
2020-07-15 17:15:25 +09:00
Yu Watanabe
a4623f84ed
network: add a debugging log
2020-07-15 17:14:30 +09:00
Lennart Poettering
6b000af4f2
tree-wide: avoid some loaded terms
...
https://tools.ietf.org/html/draft-knodel-terminology-02
https://lwn.net/Articles/823224/
This gets rid of most but not occasions of these loaded terms:
1. scsi_id and friends are something that is supposed to be removed from
our tree (see #7594 )
2. The test suite defines an API used by the ubuntu CI. We can remove
this too later, but this needs to be done in sync with the ubuntu CI.
3. In some cases the terms are part of APIs we call or where we expose
concepts the kernel names the way it names them. (In particular all
remaining uses of the word "slave" in our codebase are like this,
it's used by the POSIX PTY layer, by the network subsystem, the mount
API and the block device subsystem). Getting rid of the term in these
contexts would mean doing some major fixes of the kernel ABI first.
Regarding the replacements: when whitelist/blacklist is used as noun we
replace with with allow list/deny list, and when used as verb with
allow-list/deny-list.
2020-06-25 09:00:19 +02:00
Zbigniew Jędrzejewski-Szmek
35e601d4f9
tree-wide: use set_ensure_consume() in various places
...
No funtional change.
2020-06-24 10:38:15 +02:00
Zbigniew Jędrzejewski-Szmek
de7fef4b6e
tree-wide: use set_ensure_put()
...
Patch contains a coccinelle script, but it only works in some cases. Many
parts were converted by hand.
Note: I did not fix errors in return value handing. This will be done separate
to keep the patch comprehensible. No functional change is intended in this
patch.
2020-06-22 16:32:37 +02:00
Yu Watanabe
845d784e54
network: drop casting in memcpy()ing IPv6 address
...
Follow-up for #16067 .
2020-06-18 15:50:00 +02:00
Yu Watanabe
1bf1bfd958
network: add DHCPv6.RouteMetric=
...
Hopefully fixes #15295 .
2020-06-02 15:16:51 +09:00
Susant Sahani
ac24e418d9
network: Allow DHCPv6 client to be started even if no O or M bit in RA.
2020-04-16 09:32:19 +02:00
Yu Watanabe
d739fddeb5
network: add setting to support RA without DHCPv6 client
...
Closes #13991 .
2020-03-07 01:39:26 +09:00
Susant Sahani
a781ddefe5
network: make use of generate_ipv6_eui_64_address
2020-03-01 00:49:24 +09:00
Kevin P. Fleming
c24c83dc67
network: Allow multiple IPv6Token 'static' items to generate addresses
...
This patch allows multiple addresses using 'static' IPv6Tokens to
be generated for a single network interface.
2020-02-10 18:40:57 +09:00
Kevin P. Fleming
0ddad04eda
network: Document the lack of actual DAD usage in prefixstable algorithm
...
The RFC 7217 (prefixstable) algorithm can use Duplicate Address
Detection to produce multiple candidate addresses, but the implementation
here does not currently employ that mechanism.
2020-02-10 15:37:30 +09:00
Kevin P. Fleming
53f8cced45
network: Correct typo and naming in error message
...
This error message will be emitted when any form of SLAAC address
generation fails, not just 'prefix stable', so the message should
only refer to SLAAC.
2020-02-10 15:37:13 +09:00
Kevin P. Fleming
87f9d6ea8e
network: Improve variable name for address generation
...
The logic which can produce an IPv6 address using SLAAC produces an
address, not a prefix, so the boolean variable used to detect whether
it succeeded should reflect that.
2020-02-10 15:36:46 +09:00
Yu Watanabe
b751c3e747
network fix parser for IPv6Token=
...
extract_first_word() drops multiple ':'. So, it is not suitable for
parsing 'static' case.
2020-02-10 00:40:18 +09:00
Yu Watanabe
f0c1ad308d
network: fix ABRT
...
Fixes #14811 and oss-fuzz#20548.
2020-02-07 17:18:58 +09:00
Yu Watanabe
e2c4070edf
network: rename eui64 to static
...
See RFC 4291.
Follow-up for 5f506a5560
.
2020-02-07 13:30:40 +09:00
Susant Sahani
5f506a5560
network: Allow to specify multiple IPv6Token for SLAAC
...
Provide names to choose between different auto-generation types:
2.1 "eui64" for EUI-64 of RFC 4291
2.2 "prefixstable" for RFC 7217
```
[Match]
Name=veth99
[Network]
DHCP=no
IPv6AcceptRA=yes
IPv6Token=prefixstable:2001:888:0db8:1::
```
2020-02-05 17:44:42 +09:00
Yu Watanabe
1985c54ff3
network: static routes via DHCP gateway
...
This makes Gateway= also take "DHCP". If "DHCP" is set, then the gateway
address provided by DHCP or IPv6 RA is used.
Closes #8213 .
2020-01-07 19:10:54 +09:00
Yu Watanabe
5ecb131d94
network: include NLMSGERR_ATTR_MSG attribute in error message
2019-11-30 16:14:02 +09:00