Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | sd-dhcp6-client: make dhcp6_option_append_fqdn() or friends handle zero ↵ | Yu Watanabe | 2022-10-02 | 3 | -25/+22 |
| | | | | length value gracefully | ||||
* | sd-dhcp6-client: use assert() in non-public functions | Yu Watanabe | 2022-10-02 | 1 | -11/+19 |
| | |||||
* | sd-dhcp6-client: do not use implicit cast from integer to boolean | Yu Watanabe | 2022-10-02 | 1 | -1/+1 |
| | |||||
* | fd-util: rename CLOSE_AND_REPLACE() -> close_and_replace() | Yu Watanabe | 2022-09-17 | 1 | -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 more | David Tardon | 2022-09-13 | 9 | -43/+18 |
| | |||||
* | tree-wide: Fix format specifier warnings for %x | Jan Janssen | 2022-08-30 | 1 | -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 specifiers | Jan Janssen | 2022-08-30 | 3 | -4/+4 |
| | | | | gcc will complain about all these with -Wformat-signedness. | ||||
* | dhcp6: do not append ORO option when no option requested | Yu Watanabe | 2022-08-14 | 1 | -0/+3 |
| | | | | Fixes #24292. | ||||
* | dhcp6: gracefully handle NoBinding error | Yu Watanabe | 2022-08-13 | 5 | -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 state | Yu Watanabe | 2022-08-08 | 1 | -5/+22 |
| | |||||
* | dhcp: fix potential buffer overflow | Yu Watanabe | 2022-08-06 | 3 | -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_data | Yu Watanabe | 2022-08-06 | 5 | -69/+86 |
| | |||||
* | dhcp: make dhcp_identifier_set_duid() take struct hw_addr_data | Yu Watanabe | 2022-08-06 | 4 | -23/+32 |
| | |||||
* | dhcp: make dhcp_identifier_set_iaid() take struct hw_addr_data | Yu Watanabe | 2022-08-06 | 5 | -20/+27 |
| | |||||
* | sd-dhcp6-client: use hw_addr_set() | Yu Watanabe | 2022-08-06 | 1 | -2/+1 |
| | |||||
* | sd-dhcp-client: use struct hw_addr_data to store MAC and broadcast address | Yu Watanabe | 2022-08-06 | 1 | -35/+21 |
| | |||||
* | dhcp4: stop client before updating MAC address | Yu Watanabe | 2022-08-06 | 1 | -54/+4 |
| | |||||
* | tree-wide: drop unnecessary inclusion of netlink-util.h | Yu Watanabe | 2022-07-23 | 2 | -2/+0 |
| | |||||
* | sd-dhcp6-client: introduce sd_dhcp6_client_set_rapid_commit() | Yu Watanabe | 2022-07-22 | 2 | -3/+19 |
| | |||||
* | network: refuse 169.254.0.0/24 and 169.254.255.0/24 for IPv4LLStartAddress= | Yu Watanabe | 2022-07-15 | 1 | -10/+1 |
| | | | | Follow-up for #23927. | ||||
* | Merge pull request #23927 from AndreKalb/feature/ipv4-link-local-start-address | Yu Watanabe | 2022-07-15 | 2 | -10/+35 |
|\ | | | | | network: Feature IPv4 link-local start address | ||||
| * | sd-ipv4ll/networkd: Try to select an IPv4 link-local start address | Andre Kalb | 2022-07-14 | 2 | -10/+35 |
| | | |||||
* | | sd-dhcp6-client: fix off-by-one error in parsing dhcp6 options | Yu Watanabe | 2022-07-14 | 2 | -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 zero | Yu Watanabe | 2022-07-14 | 1 | -5/+5 |
| | | |||||
* | | sd-dhcp6-client: add more debugging logs on parsing message | Yu Watanabe | 2022-07-14 | 1 | -12/+22 |
| | | |||||
* | | sd-dhcp-client: fix log message | Yu Watanabe | 2022-07-09 | 1 | -1/+1 |
|/ | |||||
* | Merge pull request #23616 from keszybz/in-addr-to-string-formatting | Yu Watanabe | 2022-06-09 | 8 | -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 macros | Zbigniew Jędrzejewski-Szmek | 2022-06-06 | 3 | -21/+14 |
| | | |||||
| * | basic/in-addr-util: add IN_ADDR_PREFIX_TO_STRING | Zbigniew Jędrzejewski-Szmek | 2022-06-06 | 1 | -17/+10 |
| | | |||||
| * | libsystemd-network: minor simplification | Zbigniew Jędrzejewski-Szmek | 2022-06-06 | 1 | -4/+2 |
| | | |||||
| * | basic/in-addr-util: add IN_ADDR_TO_STRING | Zbigniew Jędrzejewski-Szmek | 2022-06-06 | 5 | -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 Rosbrook | 2022-06-08 | 1 | -2/+1 |
|/ | |||||
* | fuzzers: ignore size limits when compiled standalone | Zbigniew Jędrzejewski-Szmek | 2022-05-12 | 3 | -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 size | Zbigniew Jędrzejewski-Szmek | 2022-05-12 | 1 | -2/+0 |
| | | | | | It was added originally back in 2bd37c5be2f09950f26351506a00929c8719ea15, but there doesn't seem to by any particular reason for it. | ||||
* | libsystemd-network: constify casts | Zbigniew Jędrzejewski-Szmek | 2022-05-08 | 1 | -2/+2 |
| | | | | It is better to not drop the const-ness from the argument. | ||||
* | network: clarify the relationship between RA flags and DHCPv6 modes | Alex Henrie | 2022-05-06 | 1 | -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 transmit | Matthijs van Duin | 2022-05-05 | 1 | -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 zero | Yu Watanabe | 2022-05-04 | 1 | -1/+2 |
| | |||||
* | sd-ndisc: drop unused function | Yu Watanabe | 2022-05-04 | 1 | -21/+0 |
| | |||||
* | libsystemd-network: refuse too large raw_size | Yu Watanabe | 2022-05-04 | 2 | -0/+6 |
| | | | | Closes #23258. | ||||
* | libsystemd-network: add assert about packet length | Zbigniew Jędrzejewski-Szmek | 2022-04-29 | 1 | -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 half | Zbigniew Jędrzejewski-Szmek | 2022-04-29 | 1 | -8/+4 |
| | | | | This makes grepping for the messages unnecessarily painful. | ||||
* | sd-ipv4acd: actually drop the arp packet from one of the host interface | Yu Watanabe | 2022-04-07 | 1 | -1/+1 |
| | | | | | | Fixes a bug in 7f77917c0effe92d5fed52503bceddabcb4667ba. Fixes #23001. | ||||
* | sd-dhcp6-client: request several options | Yu Watanabe | 2022-04-04 | 3 | -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 used | Yu Watanabe | 2022-04-03 | 2 | -24/+11 |
| | |||||
* | dhcp: make option names singular | Yu Watanabe | 2022-04-03 | 4 | -35/+35 |
| | |||||
* | sd-dhcp6-client: sort requesting options | Yu Watanabe | 2022-04-03 | 2 | -12/+20 |
| | |||||
* | sd-dhcp6-client: rename req_opts_len -> n_req_opts | Yu Watanabe | 2022-04-03 | 2 | -8/+7 |
| | | | | | As 'len' is confusing and we may misunderstand it as the size of the buffer instead of the number of options. | ||||
* | tree-wide: add a space after if, switch, for, and while | Yu Watanabe | 2022-04-01 | 8 | -11/+11 |
| | |||||
* | time-util: assume CLOCK_BOOTTIME always exists | Lennart Poettering | 2022-03-28 | 13 | -42/+42 |
| | | | | | | | | Let's raise our supported baseline a bit: CLOCK_BOOTTIME started to work with timerfd in kernel 3.15 (i.e. back in 2014), let's require support for it now. This will raise our baseline only modestly from 3.13 → 3.15. |