Commit Graph

260 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
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
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 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 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 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 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 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 ecb0e85ea9 network: drop redundant list of prefixes and route prefixes 2020-10-07 02:44:42 +09:00
Yu Watanabe 5823a48993 network: drop networkd-ipv6-proxy-ndp.h from networkd-network.h 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 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 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 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 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
Yu Watanabe 75156ccbdc network: cleanup headers included in networkd-nexthop.h 2020-10-07 02:39:51 +09:00
Yu Watanabe b82663ddee network: drop list of static nexthops
[NextHop] sections are managed by both LIST and Hashmap.
Let's drop list, as they store the completely same information.
2020-10-07 02:39:51 +09:00
Yu Watanabe ca183bf8fd network: drop list of static routing policy rules
[RoutingPolicyRule] sections are managed by both LIST and Hashmap.
Let's drop list.
2020-10-07 02:36:29 +09:00
Daniel Mack 3db468ea87 network: add support for setting MDB entries
Multicast snooping enabled bridges maintain a database for multicast
port memberships to decide which mulicast packet is supposed to
egress on which port.

This patch teaches networkd to add entries to this database manually
by adding `[BridgeMDB]` sections to `.network` configuration files.
2020-09-10 18:55:15 +02:00
Yu Watanabe 99e015e28c network: rename settings about DHCPv6 Prefix Delegation
Closes #16602.
2020-07-29 05:50:08 +09:00
Yu Watanabe 2c62149509 network: ndisc: ignore duplicated IPv6Token= 2020-07-22 20:26:11 +09:00
Yu Watanabe e77bd3fdff network: support port number and SNI in [Network] DNS= 2020-07-21 04:08:22 +09:00
Susant Sahani 98ebef62c7 DHCPv4: client add support for DHCP server allow list 2020-07-06 22:28:54 +02:00
Yu Watanabe 1447dc625a
Merge pull request #16219 from ssahani/network-sr-iov
network: Introduce SR-IOV
2020-07-02 20:24:13 +09:00
Susant Sahani 838d39af93 network: Allow DHCPv6 client to start solicit mode
Now DHCPv6 client start only DHCPv6 INFORMATION-REQUEST mode.
Let's enable Solicit mode too.
2020-07-02 16:18:48 +09:00
Susant Sahani 518cd6b527 network: Introduce SR-IOV
SR-IOV provides the ability to partition a single physical PCI
resource into virtual PCI functions which can then be injected in
to a VM. In the case of network VFs, SR-IOV improves north-south n
etwork performance (that is, traffic with endpoints outside the
host machine) by allowing traffic to bypass the host machine’s network stack.
2020-07-01 13:51:33 +09:00
Yu Watanabe 6f6296b93f network: move IPv6LinkLocalAddressGenerationMode= to [Network] section
This also moves and renames variables and functions.

Follow-ups for a6f1848a23.
2020-06-30 18:58:52 +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
Lennart Poettering 2a71d57f4e network: clean-up DHCP lease server data configuration
This is an attempt to clean up the POP3/SMTP/LPR/… DHCP lease server
data logic in networkd. This reduces code duplication and fixes a number
of bugs.

This removes any support for collecting POP3/SMPT/LPR servers acquired
via local DHCP client releases since noone uses that, and given how old
these protocols are I doubt this will change. It keeps support for
configuring them for the dhcp server however.

The differences between the DNS/NTP/SIP/POP3/SMTP/LPR configuration
logics are minimized.

This removes the relevant symbols from sd-network.h (which is an
internal API only at this point after all).

This is unfortunately not well test, given the old code for this had
barely any tests. But the new code should not perform worse at least,
and allow us to release, since it corrects some interfaces visible in
the .network configuration format.

Fixes: #15943
2020-06-18 13:08:18 +09:00
Susant Sahani 120b5c0bbe network: DHCPv6 - Add support to set token on the LAN interface
This patch adds support to set a token on the LAN interface for
the acquired delegated prefixes for the DHCPv6 to generate address.
2020-06-17 14:20:48 +09:00
Yu Watanabe 94d76d071e network: introduce IPv4AcceptLocal= setting
Closes #16090.
2020-06-08 13:48:17 +09:00
Yu Watanabe c643bda5ec network: read driver name from ethtool
To make Driver= in [Match] section work in containers.

Note that ID_NET_DRIVER= property in udev database is set with the
result of the ethtool. So, this should not change anything for
non-container cases.

Closes #15678.
2020-06-03 18:25:37 +02:00
Yu Watanabe bdad94d0d6 network: set both dhcp_route_metric and dhcp6_route_metric by DHCP.RouteMetric= for backward compatibility
But [DHCPv4] or [DHCPv6] section take precedence.
This also update so for UseDNS= and UseNTP=.
2020-06-02 17:05:49 +09:00
Yu Watanabe 1bf1bfd958 network: add DHCPv6.RouteMetric=
Hopefully fixes #15295.
2020-06-02 15:16:51 +09:00
Yu Watanabe 132be2b868 network: use uint32_t instead of unsigned for route priority 2020-06-02 15:16:51 +09:00