Commit Graph

516 Commits

Author SHA1 Message Date
Yu Watanabe 0992f9fb0e network: introduce network_verify_nexthops() 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 50a3682f1e network: introduce network_verify_routing_policy_rules() 2020-10-07 02:36:29 +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
Zbigniew Jędrzejewski-Szmek 05d418fed9
Merge pull request #17085 from yuwata/network-configure-mdb-entries-on-bridge-master
network: allow to configure mdb entries on bridge master
2020-09-18 13:06:44 +02:00
Yu Watanabe a55100e66c network: allow to configure bridge MDB entries on bridge master 2020-09-17 18:12:40 +09:00
Susant Sahani 8f6b6d7091 network: TC - introduce fq pie
see https://patchwork.ozlabs.org/patch/1233253/
2020-09-17 17:12:07 +09:00
Yu Watanabe 46205ffcdf network: drop [BridgeMDB] entries if Bridge= is not set 2020-09-17 00:04:22 +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
Zbigniew Jędrzejewski-Szmek 90e74a66e6 tree-wide: define iterator inside of the macro 2020-09-08 12:14:05 +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
Michael Marley b209cff2ad network: Fix "Unknown section 'DHCPv6PrefixDelegation'." message
Follow-up for 99e015e28c
2020-07-30 10:34:47 +09: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
Yu Watanabe d96edb2c6e network: downgrade log level in conf parsers 2020-07-17 00:40:09 +09:00
Yu Watanabe 43bf28741f network: drop doubled white space 2020-07-15 17:15:25 +09:00
Susant Sahani 98ebef62c7 DHCPv4: client add support for DHCP server allow list 2020-07-06 22:28:54 +02: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 f9044b74c5
Merge pull request #16106 from yuwata/network-tc-ets
network: tc: introduce ETS
2020-06-24 19:04:43 +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 d474aa51bf network: tc: introduce Enhanced Transmission Selection (ETS)
Closes #15264.
2020-06-19 01:07:45 +09: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
Daan De Meyer 25c86e4c39 networkd: Add missing match_wlan_iftype check to network_verify 2020-06-14 10:47:37 +02:00
Yu Watanabe 94d76d071e network: introduce IPv4AcceptLocal= setting
Closes #16090.
2020-06-08 13:48:17 +09:00
Yu Watanabe bb9a9e33c9
Merge pull request #15171 from ssahani/tc-qfq
network: TC- Introduce Quick Fair Queueing (QFQ)
2020-06-04 11:17:42 +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 4d7ddaf97b network: tc: introduce [QuickFairQueueingClass] section 2020-06-03 17:25:44 +09:00
Susant Sahani b12aaee5ab network: tc: introduce Quick Fair Queueing (QFQ) 2020-06-03 14:17:51 +09:00
Lennart Poettering 4f9ff96a55 conf-parser: return mtime in config_parse() and friends
This is a follow-up for 9f83091e3c.

Instead of reading the mtime off the configuration files after reading,
let's do so before reading, but with the fd we read the data from. This
is not only cleaner (as it allows us to save one stat()), but also has
the benefit that we'll detect changes that happen while we read the
files.

This also reworks unit file drop-ins to use the common code for
determining drop-in mtime, instead of reading system clock for that.
2020-06-02 19:32:20 +02:00
Yu Watanabe 1bf1bfd958 network: add DHCPv6.RouteMetric=
Hopefully fixes #15295.
2020-06-02 15:16:51 +09:00
Yu Watanabe 9f83091e3c network: also read mtime of drop-in configs
Fixes #15521.
2020-06-01 17:03:40 +09:00
Yu Watanabe c4473dec34 network: do not propagte error on stat() 2020-06-01 17:03:40 +09:00
Yu Watanabe f3e4b1e07c
Merge pull request #15884 from ssahani/dhcpv6-vendor
DHCPv6: Introduce vendor specific
2020-06-01 12:25:54 +09:00
Yu Watanabe 433e14fda7 network: fix memleaks
Fixes #15951.
2020-05-29 14:49:40 +02:00
Susant Sahani 1c3ec1cd45 network: dhcp6 - fix memory leak 2020-05-29 13:37:58 +02:00
Susant Sahani b4ccc5de7d network: Inroduce DHCP6- send vendor options
network: Inroduce DHCP6- send vendor options

```
 0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      OPTION_VENDOR_OPTS       |           option-len          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                       enterprise-number                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                       vendor-option-data                      .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
```

```
  0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          sub-opt-code         |         sub-option-len        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                        sub-option-data                        .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Figure 31: Vendor-specific Options Format

      sub-opt-code         The code for the sub-option.  A 2-octet
                           field.

      sub-option-len       An unsigned integer giving the length of the
                           sub-option-data field in this sub-option in
                           octets.  A 2-octet field.

      sub-option-data      The data area for the sub-option.  The
                           length, in octets, is specified by
                           sub-option-len.

```
2020-05-29 13:37:57 +02:00
Susant Sahani 9efa8a3cff network: DHCPv6 Assign delegated prefix to LAN interface
In DHCPv6-PD environment, where WAN interface requests IPv6 via DHCPv6,
receives the address as well as delegated prefixes, with LAN interfaces
serving those delegated prefixes in their router advertisement messages.
The LAN interfaces on the router themselves do not have
the IPv6 addresses assigned by networkd from the prefix it
serves on that interface. Now this patch enables it.
2020-05-29 16:20:37 +09:00
Yu Watanabe 63b00fa77d
Merge pull request #15619 from ddstreet/ignore_carrier_loss_default
Set IgnoreCarrierLoss= default to value of ConfigureWithoutCarrier=
2020-05-29 10:04:00 +09:00
Lennart Poettering bb2294e454
Merge pull request #15669 from andir/systemd-ipv6-pd-subnet-id
networkd: subnet id support for ipv6 prefix delegation
2020-05-27 18:47:26 +02:00
Dan Streetman bd0d471c8f network: Change IgnoreCarrierLoss default to value of ConfigureWithoutCarrier
It doesn't make much sense to have ConfigureWithoutCarrier set, but not
IgnoreCarrierLoss; all the configuration added during initial interface
bring-up will be lost at the first carrier up/down.
2020-05-26 08:47:41 -04:00
Andreas Rammhold 02e9e34bd9
networkd: Add support for setting a preferred subnet id for IPv6 PD leases
This allows users to configure a subnet id that should be used instead
of automatically (sequentially) assigned subnets. The previous attempt
had the downside that the subnet id would not be the same between
networkd restarts. In some setups it is desirable to have predictable
subnet ids across restarts of services and systems.

The code for the assignment had to be broken up into two pieces. One of
them is the old (sequential) assignment of prefixes and the other is the
new assignment based on configured subnet ids. The new assignment code
has to be executed first and has to be taken into account when (later
on) allocating the "old" subnets from the same pool.

Instead of having one iteration through the links we are now trying to
allocate a prefix for every link on every delegated prefix, unless they
received an assignment in a previous iteration.
2020-05-26 12:41:22 +02:00
Susant Sahani a6f1848a23 network: Allow to configure addr_gen_mode
Defines how link-local and autoconf addresses are generated.

	0: generate address based on EUI64 (default)
	1: do no generate a link-local address, use EUI64 for addresses generated
	   from autoconf
	2: generate stable privacy addresses, using the secret from
	   stable_secret (RFC7217)
	3: generate stable privacy addresses, using a random secret if unset
2020-05-21 14:41:04 +02:00
Susant Sahani ed0d1b2e99 network: DHCPv6 - Add support to send vendor class information
Frame 1: 177 bytes on wire (1416 bits), 177 bytes captured (1416 bits) on interface veth-peer, id 0
Ethernet II, Src: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4), Dst: IPv6mcast_01:00:02 (33:33:00:01:00:02)
Internet Protocol Version 6, Src: fe80::1c04:f8ff:feb8:2fd4, Dst: ff02::1:2
User Datagram Protocol, Src Port: 546, Dst Port: 547
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0x5ca46b
    Rapid Commit
    Identity Association for Non-temporary Address
    Fully Qualified Domain Name
    Vendor Class
        Option: Vendor Class (16)
        Length: 23
        Value: 0000ab11000048656c6c6f3a686f773a6172653a796f75
        Enterprise ID: Tom Gundersen (systemd) (43793)
        vendor-class-data: Hello:how:are:you
    Identity Association for Prefix Delegation
    Option Request
    Client Identifier
    Elapsed time
2020-05-20 07:58:03 +02:00
Susant Sahani f37f2a6b8a network: DHCPv6 - Add support to send user class
Frame 115: 171 bytes on wire (1368 bits), 171 bytes captured (1368 bits) on interface veth-peer, id 0
Ethernet II, Src: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4), Dst: IPv6mcast_01:00:02 (33:33:00:01:00:02)
Internet Protocol Version 6, Src: fe80::1c04:f8ff:feb8:2fd4, Dst: ff02::1:2
User Datagram Protocol, Src Port: 546, Dst Port: 547
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0x673257
    Rapid Commit
        Option: Rapid Commit (14)
        Length: 0
    Identity Association for Non-temporary Address
        Option: Identity Association for Non-temporary Address (3)
        Length: 12
        Value: d0cc94090000000000000000
        IAID: d0cc9409
        T1: 0
        T2: 0
    Fully Qualified Domain Name
        Option: Fully Qualified Domain Name (39)
        Length: 6
        Value: 01045a657573
        0000 0... = Reserved: 0x00
        .... .0.. = N bit: Server should perform DNS updates
        .... ..0. = O bit: Server has not overridden client's S bit preference
        .... ...1 = S bit: Server should perform forward DNS updates
        Client FQDN: Zeus
    User Class
        Option: User Class (15)
        Length: 17
        Value: 000f68656c6c6f30313233343031323334
    Identity Association for Prefix Delegation
        Option: Identity Association for Prefix Delegation (25)
        Length: 12
        Value: d0cc94090000000000000000
        IAID: d0cc9409
        T1: 0
        T2: 0
    Option Request
        Option: Option Request (6)
        Length: 10
        Value: 001700180038001f000e
        Requested Option code: DNS recursive name server (23)
        Requested Option code: Domain Search List (24)
        Requested Option code: NTP Server (56)
        Requested Option code: Simple Network Time Protocol Server (31)
        Requested Option code: Rapid Commit (14)
    Client Identifier
        Option: Client Identifier (1)
        Length: 14
        Value: 00020000ab11d258482fc7eee651
        DUID: 00020000ab11d258482fc7eee651
        DUID Type: assigned by vendor based on Enterprise number (2)
        Enterprise ID: Tom Gundersen (systemd) (43793)
        Identifier: d258482fc7eee651
    Elapsed time
        Option: Elapsed time (8)
        Length: 2
        Value: 0bd0
        Elapsed time: 30240ms
2020-05-19 11:48:30 +02:00
Susant Sahani 35f6a5cb44 network: DHCPv6 - Add support set arbitary request options 2020-05-17 11:18:29 +02:00
Lennart Poettering a0b191b705 condition: add ConditionEnvironment=
Prompted by the discussions in #15180.

This is a bit more complex than I hoped, since for PID 1 we need to pass
in the synethetic environment block in we generate on demand.
2020-05-15 16:05:33 +02:00
Dan Streetman 589397a277 network: change UseGateway= default to UseRoutes= setting
Anyone previously using the UseRoutes=false parameter expected their
dhcp4-provided gateway route to be ignored, as well.  However, with
the introduction of the UseGateway= parameter, this is no longer true.

In order to keep backwards compatibility, this sets the UseGateway=
default value to whatever UseRoutes= has been set to.
2020-04-21 16:56:48 -04:00
Susant Sahani e9a8c550c1 LLDP: Add support to transmit MUD URL 2020-04-08 00:20:54 +02:00
Zbigniew Jędrzejewski-Szmek c51c6f2f57
Merge pull request #15252 from ssahani/dhcpv6-mud
DHCPv6: Add support to send MUD URL
2020-04-02 10:23:15 +02:00
Susant Sahani 3175a8c21b network: DHCPv6 Add support to send MUD URL 2020-04-01 17:01:12 +02:00
Susant Sahani 7b8d23a9bb network: DHCPv4 - introduce The Manufacturer Usage Description (MUD) 2020-03-30 20:27:48 +02:00
Lennart Poettering 1f4faf21e8
Merge pull request #15197 from ssahani/smtp-dhcp
DHCP4: Add support to emit and receive SMTP servers.
2020-03-30 18:58:26 +02:00
Susant Sahani f6269fe7bb network: DHCP - add support to emit and receive SMTP server information 2020-03-29 22:59:11 +02:00
Zbigniew Jędrzejewski-Szmek b0c8219260 network: move NETWORK_DIRS to path-lookup.h
In preparation for future changes...
2020-03-27 20:12:45 +01:00
David Wood 7354900ddd network: Fix split in `SendOption=` on client and server
When specifying `DHCPv4.SendOption=`, it is used by systemd-networkd to
set the value of that option within the DHCP request that is sent out.
This differs to setting `DHCPServer.SendOption=`, which will place all
the options together as suboptions into the vendor-specific information
(code 43) option.

This commit adds two new config options, `DHCPv4.SendVendorOption=` and
`DHCPServer.SendVendorOption=`. These both have the behaviour of the old
`DHCPServer.SendOption=` flag, and set the value of the suboption in the
vendor-specific information option.

The behaviour of `DHCPServer.SendOption=` is then changed to reflect
that of `DHCPv4.SendOption=`. It will set the value of the corresponding
option in the DHCP request.
2020-03-19 09:08:40 +01:00
Yu Watanabe b453122789 network: add a flag to ignore gateway provided by DHCP server
Closes #15117.
2020-03-16 19:34:43 +09:00
Susant Sahani 7f22402007 network: TC - introduce HHF
Please see https://lwn.net/Articles/577208/
2020-03-12 15:39:12 +09:00
Susant Sahani 1a95964bfa network: TC - introduce pfifo_fast
pfifo_fast - three-band first in, first out queue

Please see https://linux.die.net/man/8/tc-pfifo_fast
2020-03-12 15:38:18 +09:00
Susant Sahani 053a2ddbb2 network: TC - introduce pfifo_head_drop
This adds the required changes to gain access to
the head drop classfull queuing discipline named
pfifo_head_drop.
2020-03-12 15:37:17 +09:00
Susant Sahani c853f594d4 network: TC - introduce BFIFO
bfifo - Byte limited First In, First Out queue
2020-03-12 15:35:51 +09:00
Yu Watanabe ad365c5de7 network: tc: introduce DRR class 2020-03-12 15:35:51 +09:00
Susant Sahani f5fc04417e network: TC - introduce DRR
Introduce the Deficit Round Robin Scheduler is a classful queuing discipline as
a more flexible replacement for Stochastic Fairness Queuing.

http://man7.org/linux/man-pages/man8/tc-drr.8.html
2020-03-12 15:35:51 +09:00
Susant Sahani bde4ae88c8 network: tc- introduce PIE
Proportional Integral controller-Enhanced (PIE) is a control
theoretic active queue management scheme. It is based on the
proportional integral controller but aims to control delay.

http://man7.org/linux/man-pages/man8/tc-pie.8.html
2020-03-12 13:58:35 +09:00
Yu Watanabe a834cb5247
Merge pull request #15036 from yuwata/can-termination-mod
network: add CAN Termination tristate option
2020-03-07 19:11:03 +09:00
Matt Ranostay 52aa38f14a network: add CAN Termination tristate option 2020-03-07 02:00:02 +09:00
Yu Watanabe bba1f90ff5
Merge pull request #14890 from yuwata/network-tc-next
network: tc-next
2020-03-07 01:44:15 +09:00
Yu Watanabe d739fddeb5 network: add setting to support RA without DHCPv6 client
Closes #13991.
2020-03-07 01:39:26 +09:00
Yu Watanabe ef62949a23 network: make Type=ether match based on iftype
This makes Type= can match the type shown in networkctl.

Closes #14952.
2020-03-02 08:52:18 +01:00
Susant Sahani ad8352f4ff network: tc: introduce cake
CAKE (Common Applications Kept Enhanced)

Please see http://man7.org/linux/man-pages/man8/tc-cake.8.html
2020-03-02 15:59:37 +09:00
Susant Sahani 982998b087 network: TC introduce sfb - Stochastic Fair Blue
Please see https://www.systutorials.com/docs/linux/man/8-tc-sfb/
2020-03-02 15:48:24 +09:00
Susant Sahani 609e8340bb network: TC introduce GRED, Generic Random Early Detection
http://tldp.org/en/Traffic-Control-HOWTO/ar01s06.html
2020-03-02 15:48:24 +09:00
Susant Sahani a74760653c network: TC introduce PFIFO 2020-03-02 15:48:00 +09:00
Yu Watanabe 19f86a6351 network: tc: support HTB class 2020-03-02 15:46:28 +09:00
Yu Watanabe 34658df256 network: introduce TrafficControlKind to prepare for supporting tc class 2020-03-02 15:46:28 +09:00
Yu Watanabe b934ac3d6e network: tc: support Hierarchy Token Bucket (HTB) 2020-03-02 15:46:28 +09:00
Yu Watanabe 9b749c11e2 network: tc: support teql
Closes #14792.
2020-02-07 17:41:49 +09:00
Yu Watanabe 2ed5f6d5de network: introduce new [QDisc] section to support Parent=ingress
Follow-up for 18de0969c5.
2020-02-07 13:48:54 +09:00
Zbigniew Jędrzejewski-Szmek 5bbcff2a1d
Merge pull request #14415 from ssahani/prefixstable-rfc-7217-new
network: Allow to specify multiple IPv6Token for SLAAC
2020-02-05 17:05:33 +01:00
Zbigniew Jędrzejewski-Szmek 239bf9409d
Merge pull request #14536 from DaanDeMeyer/wait-online-max-operstate
wait-online: add maximum operational state option
2020-02-05 10:16:29 +01: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 f2f1b52c6f
Merge pull request #14767 from yuwata/network-split-qdisc-section
network: split TrafficControlQueueingDiscipline section into small pieces
2020-02-05 13:35:25 +09:00
Zbigniew Jędrzejewski-Szmek ca58d00c68 network: FairQueueTrafficPolicing→FairQueueing
This never made into a release, so we can change the name with impunity.
Suggested by Davide Pesavento.

I opted to add the "ing" ending. "Fair queuing" is the name of the general
concept and algorithm, and "Fair queue" is mostly used for the implementation
name.
2020-02-04 17:37:16 +01:00
Zbigniew Jędrzejewski-Szmek 60ed2dcfc7 network: TokenBufferFilter→TokenBucketFilter
This never made into a release, so we can change the name with impunity.
Noticed by Davide Pesavento.
2020-02-04 17:28:15 +01:00
Yu Watanabe 18de0969c5 network: split TrafficControlQueueingDiscipline section into small pieces
Closes #14763.
2020-02-04 21:45:39 +09:00
Zbigniew Jędrzejewski-Szmek dade734917 network,udev: refuse .link and .network settings with no matches
Two releases ago we started warning about this, and I think it is now to turn
this into a hard error. People get bitten by this every once in a while, and
there doesn't see to be any legitimate use case where the same .link or
.network files should be applied to _all_ interfaces, since in particular that
configuration would apply both to lo and any other interfaces. And if for
whatever reason that is actually desired, OriginalName=* or Name=* can be
easily added to silence the warning and achieve the effect.

(The case described in #12098 is particularly nasty: 'echo -n >foo.network'
creates a mask file, 'echo >foo.network' creates a "match all" file.)

Fixes #717, #12098 for realz now.
2020-02-04 08:45:52 +01:00
Daan De Meyer 75cd4a5d92 wait-online: Add maximum operational state option 2020-01-18 18:17:22 +01:00
Yu Watanabe 4bb7cc8287 network, udev: introduce PermanentMACAddress= setting in [Match] section
Closes #13983.
2020-01-08 17:54:54 +09:00
Susant Sahani 0f3ff4eae2 network: DHCP4 introduce send decline 2019-12-21 00:26:44 +09:00
Yu Watanabe 572b21d96c network: make Name= in [Match] support alternative names of interfaces 2019-12-16 10:55:56 +09:00
Yu Watanabe edc54f2f75 network: rename QDiscs to QDisc 2019-12-04 20:57:01 +09:00
Yu Watanabe 8efb93f02d network: ignore sections which have both NetworkEmulator and TokenBufferFilter settings 2019-12-04 20:55:55 +09:00
Yu Watanabe 0e96961d62 network: unify config_parse_dhcp_server_option_data() and config_parse_dhcp_send_option() 2019-11-18 23:39:03 +09:00
Yu Watanabe 461dbb2fa9 dhcp: remove struct sd_dhcp_raw_option
sd_dhcp_raw_option and sd_dhcp_option are essentially equivalent.
2019-11-18 23:37:22 +09:00
Yu Watanabe 95081e08d7 network: split struct Prefix into Prefix and RoutePrefix 2019-11-05 22:31:20 +09:00
Yu Watanabe 9be6ae775f network: fix memleak 2019-11-05 09:41:03 +09:00