Commit Graph

516 Commits

Author SHA1 Message Date
Susant Sahani 0a9fb9bad8 network: Allow to set device's receive queues and transmit queues 2021-01-05 12:46:28 +09:00
Yu Watanabe 75d2641190 network: introduce RouterAllowList= and RouterDenyList= in [IPv6AcceptRA] 2020-12-24 17:16:15 +09:00
Susant Sahani de6b6ff84c networkd: add support for prefix allow-list and route allow-list 2020-12-24 17:16:13 +09:00
Devon Pringle 16c89e649d networkd: add RouteDenyList
Allow configuration for IPv6 discovered routes to be ignored instead of
adding them as a route. This can be used to block unwanted routes, for
example, you may wish to not receive some set of routes on an interface
if they are causing issues.
2020-12-18 21:44:32 +09:00
Susant Sahani 937e305e93 network: Allow to configure interface promiscuous mode 2020-12-15 20:25:08 +00:00
Lennart Poettering 52ef5dd798 hostname-util: flagsify hostname_is_valid(), drop machine_name_is_valid()
Let's clean up hostname_is_valid() a bit: let's turn the second boolean
argument into a more explanatory flags field, and add a flag that
accepts the special name ".host" as valid. This is useful for the
container logic, where the special hostname ".host" refers to the "root
container", i.e. the host system itself, and can be specified at various
places.

let's also get rid of machine_name_is_valid(). It was just an alias,
which is confusing and even more so now that we have the flags param.
2020-12-15 17:59:48 +01:00
Zbigniew Jędrzejewski-Szmek 3ca1fab70a networkd: merge ll addressing fallback modes into normal "boolean" values
They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From https://github.com/systemd/systemd/issues/13316#issuecomment-582906817:
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e81083bd. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
2020-11-30 12:37:36 +09:00
Yu Watanabe 0d5eb02134
Merge pull request #17478 from yuwata/split-network-internal
libsystemd-network: split network-internal.c
2020-11-27 09:04:19 +09:00
Christof Efkemann cabe57119f networkd: fix default value of DHCPv6Client
The configuration of networkd has a DHCPv6Client setting in its
[IPv6AcceptRA] section, which, according to the man page, can be
a boolean, or the special value "always". The man page states
that "true" is the default.

The default value is implemented in src/network/networkd-network.c
by setting field ipv6_accept_ra_start_dhcp6_client of network to
true. However, this field is not a boolean, but an enum type
IPv6AcceptRAStartDHCP6Client (src/network/networkd-ndisc.h).

Setting ipv6_accept_ra_start_dhcp6_client to true effectively
corresponds to the enum value IPV6_ACCEPT_RA_START_DHCP6_CLIENT_ALWAYS,
resulting in the DHCPv6Client setting having the default value
"always".

This patch changes the initialisation to the correct enum value
IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES.
2020-11-16 16:09:37 +09:00
Yu Watanabe 71a5db49fd network: make default router lifetime to 30min
Closes #17527.
2020-11-10 00:04:42 +09:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Yu Watanabe 5722fb89bc net-condition: introduce struct NetMatch 2020-10-29 15:04:52 +09:00
Yu Watanabe 7e19cc5462 net-condition: move net_match_config() and related conf parsers 2020-10-29 14:23:49 +09:00
Yu Watanabe 27ff0490e6 network: rename IPv6PrefixDelegation= to IPv6SendRA= 2020-10-19 14:55:18 +09:00
Yu Watanabe 4afd986753 network: introduce Announce= in [DHCPv6PrefixDelegation]
When disabled, the delegated prefixes are not emit by RA.

Closes #17353.
2020-10-19 12:09:36 +09:00
Yu Watanabe e502f94dcf network: introduce DHCPv6PrefixDelegation= setting
Then, the link can configure prefix delegated by DHCPv6 without emitting
RA.
2020-10-19 10:09:38 +09:00
Yu Watanabe db5756f3f3 network: sort and rename elements in Network object 2020-10-19 10:09:38 +09:00
Yu Watanabe 69e0f833a3 network: introduce network_adjust_radv() 2020-10-19 10:09:38 +09:00
Yu Watanabe 5e2767720a network: use string_hash_ops_free for search domains 2020-10-19 10:09:38 +09:00
Yu Watanabe 22d37e5df6 network: introduce network_adjust_dhcp() 2020-10-15 07:06:58 +09:00
Yu Watanabe 3773eb5485 network: introduce network_adjust_ipv6_accept_ra() 2020-10-15 07:06:36 +09:00
Yu Watanabe 10fa21c0dc network: move IPv4ACD client for DHCPv4 from Network to Link object
A .network file may matches multiple interfaces.
2020-10-14 15:38:29 +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 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
Yu Watanabe bbe694f91f network: introduce network_verify_sr_iov() 2020-10-07 02:50:50 +09:00
Yu Watanabe 209af9a67a network: introduce network_verify_traffic_control() 2020-10-07 02:50:50 +09:00
Yu Watanabe 093e35334d network: header cleanup 2020-10-07 02:50:50 +09:00
Yu Watanabe 9cd9fc8f44 network: drop list of static addresses
[Address] sections are managed by both LIST and Hashmap. Let's drop the
list and manage them by OrderedHashmap.
2020-10-07 02:50:50 +09:00
Yu Watanabe 32400c2ff0 network: introduce network_verify_addresses() 2020-10-07 02:50:50 +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 d9940a3f8a network: introduce network_verify_routes() 2020-10-07 02:44:42 +09:00
Yu Watanabe b5ce40472c network: cleanup networkd-radv.h 2020-10-07 02:44:42 +09:00
Yu Watanabe 1a7deb2fcf network: introduce network_verify_prefix() and network_verify_route_prefix() 2020-10-07 02:44:42 +09:00
Yu Watanabe d30081c24e network: also check route prefixes are configured 2020-10-07 02:44:42 +09:00
Yu Watanabe ecb0e85ea9 network: drop redundant list of prefixes and route prefixes 2020-10-07 02:44:42 +09:00
Yu Watanabe 87851e0feb network: warn if IPv6ProxyNDPAddress= is set and IPv6ProxyNDP= is disabled 2020-10-07 02:44:42 +09:00
Yu Watanabe d349f5026e network: drop struct IPv6ProxyNDPAddress
Its only important value is in6_addr. So, let's just use struct in6_addr
and drop IPv6ProxyNDPAddress.
2020-10-07 02:44:42 +09:00
Yu Watanabe dbf6319691 network: cleanup networkd-mdb.h 2020-10-07 02:44:42 +09:00
Yu Watanabe ee4522ce86 network: introduce network_verify_mdb_entries() 2020-10-07 02:44:42 +09:00
Yu Watanabe 03c9738e1d network: drop list of bridge MDB entries
[BridgeMDB] sections are managed by LIST and Hashmap, and they contins
the completely same information. Let's drop the list.
2020-10-07 02:44:42 +09:00
Yu Watanabe ee446d57b8 network: cleanup networkd-fdb.h 2020-10-07 02:44:42 +09:00
Yu Watanabe e6ad630d77 network: introduce network_verify_fdb_entries() 2020-10-07 02:44:42 +09:00
Yu Watanabe 62ed9442bf network: drop list of bridge FDB entries
[BridgeFDB] sections are managed by both LIST and Hashmap, and they
contains the completely same information. Let's drop the list.
2020-10-07 02:44:42 +09:00
Yu Watanabe fb486c9082 network: cleanup networkd-address-label.h 2020-10-07 02:44:42 +09:00
Yu Watanabe ab316813ea network: introduce network_verify_address_labels() 2020-10-07 02:44:42 +09:00
Yu Watanabe d6a2a0f9a7 network: drop list of static address labels
[IPv6AddressLabel] sections are managed by both LIST and Hashmap.
Let's drop list, as they store the completely same information.
2020-10-07 02:44:42 +09:00
Yu Watanabe 78ada14f25 network: introduce network_verify_neighbors() 2020-10-07 02:44:42 +09:00
Yu Watanabe 1939ebeb89 network: cleanup headers in networkd-neighbor.[ch] 2020-10-07 02:44:42 +09:00
Yu Watanabe b0ba6938df network: drop list of static neighbors
[Neighbor] sections are managed by both LIST and Hashmap.
Let's drop list, as they store the completely same information.
2020-10-07 02:44:42 +09:00