summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
Commit message (Collapse)AuthorAgeFilesLines
...
| * sd-dhcp6-client: use assert() in non-public functionsYu Watanabe2022-10-021-11/+19
| |
| * sd-dhcp6-client: do not use implicit cast from integer to booleanYu Watanabe2022-10-021-1/+1
| |
* | Merge pull request #24957 from ↵Luca Boccassi2022-10-112-11/+10
|\ \ | | | | | | | | | | | | yuwata/network-ignore-failure-in-sending-solicitation network: ignore failure in sending solicitation
| * | sd-radv: mention that failures in sending RA are ignoredYu Watanabe2022-10-111-4/+4
| | |
| * | sd-ndisc: ignore failure in sending solicitationYu Watanabe2022-10-111-7/+6
| |/ | | | | | | | | | | | | | | | | Even if a bonding master interface has carrier, the underlying slave interfaces may not. In such a case, sending solicitation fails with -ENOBUS. Here, let's unconditionally ignore errors, as anyway we will send a solicitation later. Fixes #24717.
* | tree-wide: drop () around the first argument of a ternary opZbigniew Jędrzejewski-Szmek2022-10-111-1/+1
|/ | | | https://github.com/systemd/systemd/pull/24933#discussion_r991242789
* fd-util: rename CLOSE_AND_REPLACE() -> close_and_replace()Yu Watanabe2022-09-171-1/+1
| | | | | | | | We have free_and_replace() and friends, they are all named with lower letters, even they are macros, not functions. For consistency, let's rename CLOSE_AND_REPLACE() with lower letters. This also mekes the macro used more places.
* tree-wide: use ASSERT_PTR moreDavid Tardon2022-09-139-43/+18
|
* tree-wide: Fix format specifier warnings for %xJan Janssen2022-08-301-2/+2
| | | | | | Unfortunately, hex output can only be produced with unsigned types. Some cases can be fixed by producing the correct type, but a few simply have to be cast. At least casting makes it explicit.
* tree-wide: Use correct format specifiersJan Janssen2022-08-303-4/+4
| | | | gcc will complain about all these with -Wformat-signedness.
* dhcp6: do not append ORO option when no option requestedYu Watanabe2022-08-141-0/+3
| | | | Fixes #24292.
* dhcp6: gracefully handle NoBinding errorYu Watanabe2022-08-135-7/+39
| | | | | | | When we receive NoBinding status code, the requesting binding (address or any other information) does not exist anymore in the server. Hence, resending the request is meaningless. Let's restart the transaction from the beginning in that case.
* dhcp: add assertions about client stateYu Watanabe2022-08-081-5/+22
|
* dhcp: fix potential buffer overflowYu Watanabe2022-08-063-12/+12
| | | | | | Fixes a bug introduced by 324f818781a250b60f2fcfa74ff1c9101d2d1315. This also renames several macros for DHCP packet size.
* dhcp: make dhcp_network_bind_raw_socket() take struct hw_addr_dataYu Watanabe2022-08-065-69/+86
|
* dhcp: make dhcp_identifier_set_duid() take struct hw_addr_dataYu Watanabe2022-08-064-23/+32
|
* dhcp: make dhcp_identifier_set_iaid() take struct hw_addr_dataYu Watanabe2022-08-065-20/+27
|
* sd-dhcp6-client: use hw_addr_set()Yu Watanabe2022-08-061-2/+1
|
* sd-dhcp-client: use struct hw_addr_data to store MAC and broadcast addressYu Watanabe2022-08-061-35/+21
|
* dhcp4: stop client before updating MAC addressYu Watanabe2022-08-061-54/+4
|
* tree-wide: drop unnecessary inclusion of netlink-util.hYu Watanabe2022-07-232-2/+0
|
* sd-dhcp6-client: introduce sd_dhcp6_client_set_rapid_commit()Yu Watanabe2022-07-222-3/+19
|
* network: refuse 169.254.0.0/24 and 169.254.255.0/24 for IPv4LLStartAddress=Yu Watanabe2022-07-151-10/+1
| | | | Follow-up for #23927.
* Merge pull request #23927 from AndreKalb/feature/ipv4-link-local-start-addressYu Watanabe2022-07-152-10/+35
|\ | | | | network: Feature IPv4 link-local start address
| * sd-ipv4ll/networkd: Try to select an IPv4 link-local start addressAndre Kalb2022-07-142-10/+35
| |
* | sd-dhcp6-client: fix off-by-one error in parsing dhcp6 optionsYu Watanabe2022-07-142-2/+44
| | | | | | | | | | | | | | This fixes error in parsing message when the rapid commit option is located at the end of the message. Fixes an issure reported in #24002.
* | sd-dhcp6-client: allow NULL option value when length is zeroYu Watanabe2022-07-141-5/+5
| |
* | sd-dhcp6-client: add more debugging logs on parsing messageYu Watanabe2022-07-141-12/+22
| |
* | sd-dhcp-client: fix log messageYu Watanabe2022-07-091-1/+1
|/
* Merge pull request #23616 from keszybz/in-addr-to-string-formattingYu Watanabe2022-06-098-68/+42
|\ | | | | Add macros that allocate a fixed buffer for in_addr_to_string(), in_addr_prefix+to_string()
| * tree-wide: convert inet_ntop() calls to anonymous-buffer macrosZbigniew Jędrzejewski-Szmek2022-06-063-21/+14
| |
| * basic/in-addr-util: add IN_ADDR_PREFIX_TO_STRINGZbigniew Jędrzejewski-Szmek2022-06-061-17/+10
| |
| * libsystemd-network: minor simplificationZbigniew Jędrzejewski-Szmek2022-06-061-4/+2
| |
| * basic/in-addr-util: add IN_ADDR_TO_STRINGZbigniew Jędrzejewski-Szmek2022-06-065-26/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't need the error value, and the buffer is allocated with a fixed size, the whole logic provided by in_addr_to_string() becomes unnecessary, so it's enough to wrap inet_ntop() directly. inet_ntop() can only fail with ENOSPC. But we specify a buffer that is supposed to be large enough, so this should never fail. A bunch of tests of this are added. This allows all the wrappers like strna(), strnull(), strempty() to be dropped. The guard of 'if (DEBUG_LOGGING)' can be dropped from around log_debug(), because log_debug() implements the check outside of the function call. But log_link_debug() does not, so it we need it to avoid unnecessary evaluation of the formatting.
* | libsystemd-network: use udev_available()Nick Rosbrook2022-06-081-2/+1
|/
* fuzzers: ignore size limits when compiled standaloneZbigniew Jędrzejewski-Szmek2022-05-123-3/+3
| | | | | This way we can still call fuzzers on old samples, but oss-fuzz will not waste its and our time finding overly large inputs.
* fuzz-dhcp-server: remove limit on input sizeZbigniew Jędrzejewski-Szmek2022-05-121-2/+0
| | | | | It was added originally back in 2bd37c5be2f09950f26351506a00929c8719ea15, but there doesn't seem to by any particular reason for it.
* libsystemd-network: constify castsZbigniew Jędrzejewski-Szmek2022-05-081-2/+2
| | | | It is better to not drop the const-ness from the argument.
* network: clarify the relationship between RA flags and DHCPv6 modesAlex Henrie2022-05-061-1/+1
| | | | | | | | | | | | | | | | | | In the documentation, using the term "managed" for both the RA flag and the DHCPv6 mode is confusing because the mode is referred to as "solicit" both in the official DHCPv6 documentation (see RFC 8415) and in the WithoutRA option. Furthermore, calling the other RA flag "other information" or "other address configuration" is confusing because its official name is simply "other configuration" (see RFC 4861 and RFC 5175) and it isn't used to assign IP addresses. Rewrite the documentation for DHCPv6Client and WithoutRA to make it clear that getting the "managed" RA flag triggers the same kind of DHCP request as WithoutRA=solicit, whereas getting the "other configuration" RA flag triggers the same kind of DHCP request as WithoutRA=information-request.
* Fix placement of TTL TLV in LLDP transmitMatthijs van Duin2022-05-051-9/+18
| | | | | | | | | The LLDP spec (IEEE 802.1AB) requires the three mandatory TLVs (Chassis ID, Port ID, and TTL) to be the first three TLVs in the packet, in that specific order, whereas systemd put the TTL near the end of the packet. This violation caused the ethernet switch in our office to discard these packets as malformed, and Wireshark's packet parser also chokes on them.
* sd-lldp: use memcpy_safe() as the buffer size may be zeroYu Watanabe2022-05-041-1/+2
|
* sd-ndisc: drop unused functionYu Watanabe2022-05-041-21/+0
|
* libsystemd-network: refuse too large raw_sizeYu Watanabe2022-05-042-0/+6
| | | | Closes #23258.
* libsystemd-network: add assert about packet lengthZbigniew Jędrzejewski-Szmek2022-04-291-0/+1
| | | | | | | | We reject too-short packets in client_receive_message_raw(), so the packets that dhcp_packet_verify_headers() gets are of sufficient size. But let's add an assert to clarify this for the reader. Closes #23223.
* libsystemd-network: do not split messages in halfZbigniew Jędrzejewski-Szmek2022-04-291-8/+4
| | | | This makes grepping for the messages unnecessarily painful.
* sd-ipv4acd: actually drop the arp packet from one of the host interfaceYu Watanabe2022-04-071-1/+1
| | | | | | Fixes a bug in 7f77917c0effe92d5fed52503bceddabcb4667ba. Fixes #23001.
* sd-dhcp6-client: request several optionsYu Watanabe2022-04-043-7/+55
| | | | | Even though these options are not currently used by sd-dhcp6-client, RFC 8415 states these options MUST be requested.
* network: dhcp6: request DNS servers or friends only when they will be usedYu Watanabe2022-04-032-24/+11
|
* dhcp: make option names singularYu Watanabe2022-04-034-35/+35
|
* sd-dhcp6-client: sort requesting optionsYu Watanabe2022-04-032-12/+20
|