summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp-common.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dhcp: introduce sd_dhcp_duid and move relevant functions to sd_dhcp_duid.[ch]Yu Watanabe2023-12-221-1/+1
|
* network: introduce SendHostname/Hostname DHCPv6 optionsRonan Pigott2023-10-301-0/+1
| | | | | These options were previously reused by the DHCPv6 client from the DHCPv4 client settings. Let's separate them for consistency.
* network/dhcp: fix maximal DUID data sizeYu Watanabe2023-08-241-1/+1
| | | | | The maximum DUID size is 128, but that includes type specified. Hence, the maximal data size is 126.
* network: introduce link_get_captive_portal()Yu Watanabe2023-07-061-0/+2
| | | | | Then, downgrade log level of the message about mis-match of captive portals in different protocols.
* network: adjust route priority based on preferenceYu Watanabe2022-10-281-1/+5
| | | | | | | | Even if different preference is specified, the kernel merges multiple routes with the same preference. This is problematic when a network has multiple routers. Fixes #25138.
* network: dhcp6pd: always use main route table for unreachable routeYu Watanabe2021-12-071-1/+0
| | | | This mostly reverts e47bcb7d0b2cb07c5c594e374baeb061bb7f88ba.
* network: dhcp6: introduce UplinkInterface= for DHCP6 prefix delegationYu Watanabe2021-10-261-0/+1
|
* network: move config_parse_uplink() to networkd-dhcp-common.[ch]Yu Watanabe2021-10-261-0/+5
|
* network: dhcp6pd: set default metric 256 for delegated prefixYu Watanabe2021-10-191-0/+1
| | | | | | | | | | | When Assign= in [DHCPv6PrefixDelegation] is enabled, then the kernel will create the prefix route for the assigned address with metric 256. When Assign= is disabled, then the kernel will create the route with metric 1024. For the default value, we should choose a smaller value (higher priority) than 1024, as the unreachable routes for delegated prefix will be configured with 1024.
* network: replace config_parse_address_filter() with ↵Yu Watanabe2021-09-141-1/+0
| | | | config_parse_in_addr_prefixes()
* network: do not use RouteTable= in [DHCPv4] section for DHCPv6 routesYu Watanabe2021-09-141-1/+5
| | | | | We forgot to add RouteTable= in [DHCPv6] section when we split [DHCP] into two.
* network: use ltype to distinguish DHCPv4 and DHCPv6Yu Watanabe2021-09-141-1/+1
|
* network: dhcp4,ndisc: make addresses in Allow/DenyList= optionally take ↵Yu Watanabe2021-08-231-0/+11
| | | | | | prefix length Closes #20505.
* network: dhcp: constify link_get_duid()Yu Watanabe2021-04-211-4/+4
|
* network: configure non-dhcp configs earlier even DUID-UUID is used by DHCP ↵Yu Watanabe2021-04-211-1/+1
| | | | | | | | | | clients Previously, if DUID-UUID is used, all configurations are configured after networkd gets product uuid of machine. This makes only DHCP clients are delayed, and other configs are configured earlier.
* network: make IAID and DUID for DHCPv6 configurable explicitlyYu Watanabe2021-04-211-2/+14
| | | | Closes #18996.
* network: move dhcp related conf parsers to networkd-dhcp-common.cYu Watanabe2021-04-211-0/+4
|
* tree-wide: use -EINVAL for enum invalid valuesZbigniew Jędrzejewski-Szmek2021-02-101-1/+1
| | | | | | | | | As suggested in https://github.com/systemd/systemd/pull/11484#issuecomment-775288617. This does not touch anything exposed in src/systemd. Changing the defines there would be a compatibility break. Note that tests are broken after this commit. They will be fixed in the next one.
* network: merge config_parse_dhcp_user_class() and _vendor_class()Yu Watanabe2021-01-121-2/+1
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* network: introduce network_adjust_dhcp()Yu Watanabe2020-10-151-0/+3
|
* network: move DUID related functionsYu Watanabe2020-10-061-0/+5
|
* network: unify link_dhcp{4,6}_enabled()Yu Watanabe2020-10-061-0/+10
|
* network: drop an unused functionYu Watanabe2020-06-021-1/+0
|
* network: move DHCPv6 related conf parsers to networkd-dhcp6.cYu Watanabe2020-06-021-2/+0
|
* network: set both dhcp_route_metric and dhcp6_route_metric by ↵Yu Watanabe2020-06-021-0/+1
| | | | | | | DHCP.RouteMetric= for backward compatibility But [DHCPv4] or [DHCPv6] section take precedence. This also update so for UseDNS= and UseNTP=.
* network: DHCPv6 - Add support to send vendor class informationSusant Sahani2020-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* network: DHCPv6 - Add support to send user classSusant Sahani2020-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* network: DHCPv6 - Add support set arbitary request optionsSusant Sahani2020-05-171-0/+1
|
* DHCP client: make SendOption work for DHCPv6 too.Andrew Doran2020-05-111-0/+1
|
* network: DHCPv6 Add support to send MUD URLSusant Sahani2020-04-011-0/+1
|
* network: unify config_parse_dhcp_server_option_data() and ↵Yu Watanabe2019-11-181-0/+1
| | | | config_parse_dhcp_send_option()
* network: rename DHCPRawOption to DHCPOptionDataTypeYu Watanabe2019-11-171-0/+13
| | | | And moves the definition from networkd-dhcp-server.[ch] to networkd-dhcp-common.[ch].
* network: DHCPv6 client add support for prefix delegation hintSusant Sahani2019-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for prefix hint lenth and prefix hint address ``` Frame 43: 177 bytes on wire (1416 bits), 177 bytes captured (1416 bits) on interface 0 Ethernet II, Src: f6:c1:08:4d:45:f1 (f6:c1:08:4d:45:f1), Dst: IPv6mcast_01:00:02 (33:33:00:01:00:02) Internet Protocol Version 6, Src: fe80::d250:c82:7f6e:28d6, Dst: ff02::1:2 User Datagram Protocol, Src Port: 546, Dst Port: 547 DHCPv6 Message type: Solicit (1) Transaction ID: 0x5c7902 Rapid Commit Identity Association for Non-temporary Address Fully Qualified Domain Name Identity Association for Prefix Delegation Option: Identity Association for Prefix Delegation (25) Length: 41 Value: 1b97b1690000000000000000001a0019ffffffffffffffff… IAID: 1b97b169 T1: 0 T2: 0 IA Prefix Option: IA Prefix (26) Length: 25 Value: ffffffffffffffff3c000000000000000000000000000000… Preferred lifetime: infinity Valid lifetime: infinity Prefix length: 60 Prefix address: :: Option Request Client Identifier Elapsed time ```
* network: DHCP server Add support to transmit SIP serverSusant Sahani2019-09-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. DHCP server trasmit 2. Client parses and saves in leases Implements http://www.rfc-editor.org/rfc/rfc3361.txt ``` Frame 134: 348 bytes on wire (2784 bits), 348 bytes captured (2784 bits) on interface 0 Ethernet II, Src: 42:65:85:d6:4e:32 (42:65:85:d6:4e:32), Dst: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4) Internet Protocol Version 4, Src: 192.168.5.1, Dst: 192.168.5.11 User Datagram Protocol, Src Port: 67, Dst Port: 68 Dynamic Host Configuration Protocol (ACK) Message type: Boot Reply (2) Hardware type: Ethernet (0x01) Hardware address length: 6 Hops: 0 Transaction ID: 0x7cc87cb4 Seconds elapsed: 0 Bootp flags: 0x0000 (Unicast) Client IP address: 0.0.0.0 Your (client) IP address: 192.168.5.11 Next server IP address: 0.0.0.0 Relay agent IP address: 0.0.0.0 Client MAC address: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4) Client hardware address padding: 00000000000000000000 Server host name not given Boot file name not given Magic cookie: DHCP Option: (53) DHCP Message Type (ACK) Length: 1 DHCP: ACK (5) Option: (51) IP Address Lease Time Length: 4 IP Address Lease Time: (3600s) 1 hour Option: (1) Subnet Mask (255.255.255.0) Length: 4 Subnet Mask: 255.255.255.0 Option: (3) Router Length: 4 Router: 192.168.5.1 Option: (6) Domain Name Server Length: 4 Domain Name Server: 192.168.5.1 Option: (42) Network Time Protocol Servers Length: 4 Network Time Protocol Server: 192.168.1.1 Option: (120) SIP Servers <=====here Length: 9 SIP Server Encoding: IPv4 Address (1) SIP Server Address: 192.168.1.1 SIP Server Address: 192.168.5.2 Option: (101) TCode Length: 13 TZ TCode: Europe/Berlin Option: (54) DHCP Server Identifier (192.168.5.1) Length: 4 DHCP Server Identifier: 192.168.5.1 Option: (255) End Option End: 255 ``` ``` cat /run/systemd/netif/state  ✔  ⚡  3148  16:40:51 OPER_STATE=routable CARRIER_STATE=carrier ADDRESS_STATE=routable DNS=192.168.94.2 192.168.5.1 NTP=192.168.5.1 SIP=192.168.1.1 192.168.5.2 ``` aa
* network: rename [DHCP] section to [DHCPv4]Yu Watanabe2019-07-101-0/+2
| | | | To keep the backward compatibility broken by the previous commit.
* network: move conf parsers and function prototypesYu Watanabe2019-06-291-0/+33