Commit Graph
4172 Commits
Author SHA1 Message Date
Yu Watanabe 1ae308abb5 network: tunnel: support external mode
Closes #22352.
2022-02-03 11:12:01 +09:00
Yu Watanabe acd8abb7f9 network: tunnel: reorder setting ip6tnl attributes
Just for improving readability.
2022-02-03 11:10:15 +09:00
Yu Watanabe a07e07cd9c network: tunnel: reduce indentation in config_parse_encap_limit() 2022-02-03 11:10:15 +09:00
Yu Watanabe 59c8bef008 network: tunnel: reduce indentation in config_parse_ipv6_flowlabel() 2022-02-03 11:10:15 +09:00
Yu Watanabe 396dfe0a14 network: tunnel: use "data" field to assign result 2022-02-03 11:10:15 +09:00
Yu Watanabe 613d65d88f network: update operational state when we remove an address 2022-02-02 20:44:47 +09:00
Yu Watanabe faa1b3c6c4 network: dhcp-server: make empty string to DNS= or friends clear previously specified servers 2022-02-02 10:02:57 +09:00
Yu Watanabe 32f8a613c5 sd-dhcp-lease: store static routes and classless static routes in different arrays
When classless static routes option is provided, then static routes
option should not be used. Hence, let's not mix and store them in one
storage.

This introduce sd_dhcp_lease_get_static_routes() and
sd_dhcp_lease_get_classless_routes().
2022-02-02 10:02:44 +09:00
Yu Watanabe 6a8ab6dd1e Merge pull request #22332 from yuwata/network-dhcp-server-dns-server-address
network: dhcp-server: allow to specify server address for DNS= or friends
2022-02-02 07:07:22 +09:00
Yu Watanabe 5f468b9f57 network: dhcp-server: introduce special value DNS=_server_address
Closes #15026.
2022-02-02 05:01:53 +09:00
Luca Boccassi 98fd285c28 Merge pull request #22331 from yuwata/network-xfrm-interface-id
network: xfrm: refuse zero interface ID
2022-02-01 13:25:38 +00:00
Yu Watanabe bab29f2ab7 network: dhcp-server: also refuse link local address to use as the server address 2022-02-01 11:18:53 +00:00
Yu Watanabe 77e73102dd network: use GREEDY_REALLOC() at one more place 2022-02-01 16:14:59 +09:00
Yu Watanabe 05c6311291 network: drop outdated TODO comment
Follow-up for 59aa622013.
2022-02-01 15:38:42 +09:00
Yu Watanabe fd11005951 network: xfrm: refuse zero interface ID
Since kernel 5.17-rc1, 5.16.3, and 5.15.17 (more specifically,
https://github.com/torvalds/linux/commit/8dce43919566f06e865f7e8949f5c10d8c2493f5)
the kernel refuses to create an xfrm interface with zero ID.
2022-02-01 13:15:11 +09:00
Yu Watanabe fb96111946 network: also use link_reconfigure_impl() to initially assign .network file 2022-02-01 11:38:01 +09:00
Yu Watanabe bb193d2df2 network: drop tiny wrapper used only one place anymore 2022-02-01 11:37:45 +09:00
Yu Watanabe 3cf58ef316 network: do not free bound_by carrier map on reconfigure
Otherwise, if a link enters unmanaged state, then its carrier state does
not propagated to other interfaces.
2022-02-01 11:37:01 +09:00
Yu Watanabe b69bfa4305 network: do not remove localhost address
Managing loopback interfaces by networkd is not recommended, but supporeted.
Even such spurious situation, do not drop the localhost addresses.
2022-02-01 11:30:37 +09:00
Yu Watanabe 259c65f36c network: move ndisc_flush() to link_stop_engines()
As it is not related to any static configs.
2022-02-01 11:30:37 +09:00
Yu Watanabe a0e99a377a network: remove only managed configs on reconfigure or carrier lost
Otherwise, if the carrir of the non-managed interface is lost, the
configs such as addresses or routes on the interface will be removed by
networkd.
2022-02-01 11:30:37 +09:00
Frantisek Sumsal e3d1ffcc48 network: s/confiured/configured/
A quick typo fix I noticed whilst debugging.
2022-01-31 23:07:41 +00:00
Yu Watanabe c565b65553 network: currently IPv4ACD requires MAC address whose length is ETH_ALEN 2022-01-31 13:10:28 +09:00
Yu Watanabe 218a850268 network: currently RADV requires MAC address whose length is ETH_ALEN 2022-01-31 13:10:28 +09:00
Yu Watanabe f4ef1c196c network: disable NDisc for CAN interfaces
We already disabled DHCP clients for CAN interfaces.
2022-01-31 13:10:28 +09:00
Yu Watanabe ba4c7184b3 network: configure NDisc after MAC address is assigned 2022-01-31 13:10:28 +09:00
Yu Watanabe f42d41cc5f network: configure DHCP clients after MAC address is assigned
Prompted by #20090.
2022-01-31 13:10:28 +09:00
Yu Watanabe e74f1d07b3 network: use hashmap_remove_value() at two more places 2022-01-29 00:30:22 +09:00
Yu Watanabe 1a054a208c network: fix log messages 2022-01-28 08:34:57 +00:00
Yu Watanabe cd7fcda543 wait-online: make manager_link_is_online() return 0 when in unmanaged state
Previously, even if a link is in unmanaged state, the function may
returns positive value. So, even if all managed links are in the configured
sate but do not satisfy the online criteria, e.g., IPv4 address state,
then wait-online finishes with positive value.

This makes the function always return 0 for unmanaged state. So, at
least one managed link must satisfies the online criteria.

This also adds more comments and debugging logs.

Fixes #22246.
2022-01-26 22:41:47 +09:00
Yu Watanabe 5f200833ed wait-online: rename Manager elements 2022-01-26 22:41:47 +09:00
Yu Watanabe 1a4152f02b wait-online: use network_link_get_operational_state() 2022-01-21 06:22:39 +09:00
Yu Watanabe 61e964df71 netif-util: introduce netif_has_carrier() 2022-01-21 05:02:42 +09:00
Yu Watanabe df25b9e48c network: show driver in debug log 2022-01-19 15:00:53 +09:00
Yu Watanabe 41ce9d769d udev/net: allow to set number of SR-IOV virtual functions
This adds SR-IOVVirtualFunctions= setting in [Link] section.
2022-01-19 15:00:53 +09:00
Yu Watanabe b4fd34d81c network: move SR-IOV related functions to src/shared/netif-sriov.[ch] 2022-01-19 14:57:59 +09:00
Yu Watanabe 307fe3cdf2 network: rename NetworkConfigSection -> ConfigSection
And move it and relevant functions to conf-parser.[ch].
2022-01-19 14:57:59 +09:00
Yu Watanabe e5c4289a9d network: sr-iov: add missing assertion 2022-01-19 14:57:59 +09:00
Yu Watanabe e217e22a77 network: sr-iov: drop conflicting sections 2022-01-19 14:57:59 +09:00
Yu Watanabe cfd1d61fe4 network: sr-iov: fix section name in log messages 2022-01-19 14:57:59 +09:00
Yu Watanabe e135559d80 network: wireguard: also accept negative boolean values to disable adding routes
RouteTable=off was introduced to provide consistency with wg-quick
command. This makes the RouteTable= settings accepts other negative
boolean values.
2022-01-16 19:25:28 +09:00
Yu Watanabe cfe1237f38 network: wireguard: do not add routes to AllowedIPs= by default
As setting such routes may break existing setups.

Closes #21964.
2022-01-16 19:18:23 +09:00
Zbigniew Jędrzejewski-Szmek 100433e05a networkctl: use xsprintf a bit more 2022-01-14 16:24:27 +09:00
Zbigniew Jędrzejewski-Szmek d821e40ca9 networkctl: open the bus just once
We'd connect to the bus twice: the first time to check networkd namespace,
and then the second time to do the deed we were asked to do. It's nicer
to open the bus just once, for efficience and also to avoid the open call
in all functions.

An ASSERT_PTR helper is added:
- sd_bus *bus = userdata;
  ...
- assert(bus);
+ sd_bus *bus = ASSERT_PTR(userdata);
  ...

It can be used in other place too, but I'm leaving that for a later
refactoring.
2022-01-14 16:24:04 +09:00
Yu Watanabe 902bbdc4b6 network: use scope link for direct unicast routes by default
Strictly speaking, this breaks the backward compatibility, but I guess
in most cases people already sets Scope=link for such routes.

This behavior matches with how 'ip route' command adds such route by
default.

Prompted by https://twitter.com/jplitza/status/1480500562391179270.
2022-01-13 22:46:52 +00:00
Zbigniew Jędrzejewski-Szmek ffb8c82715 Merge pull request #22092 from keszybz/docs-links
Add more doc pages, adjust links, add explanatory headers to examples and relax license to CC-0
2022-01-12 16:06:39 +01:00
Zbigniew Jędrzejewski-Szmek d6e2c1ab71 policy files: adjust landing page link 2022-01-12 16:05:59 +01:00
Yu Watanabe d5ff7bdbb7 Merge pull request #22088 from medhefgo/meson
meson: Small improvements
2022-01-12 22:01:27 +09:00
Yu Watanabe d5f8fd5b00 network: dhcp6: do not request address if UseAddress=no
Fixes #22068.
2022-01-11 17:05:12 +00:00
Jan Janssen bbec46c817 meson: Use files() for fuzzers
Not having to provide the full path in the source tree is much
nicer and the produced lists can also be used anywhere in the source
tree.
2022-01-11 14:15:54 +01:00