Commit Graph
67462 Commits
Author SHA1 Message Date
Yu Watanabe 626d653a90 sd-ipv4acd: introduce sd_ipv4acd_is_bound() 2023-07-30 23:15:53 +09:00
Yu Watanabe 722ac24651 network/ipv4acd: drop unused argument 2023-07-30 23:15:53 +09:00
Yu Watanabe 262ac7fcf2 network/ipv4acd: use IN4_ADDR_TO_STRING() 2023-07-30 23:15:40 +09:00
Yu Watanabe b1179a5d0b network/address: ignore address settings with unsupported flags 2023-07-30 22:53:49 +09:00
Yu Watanabe d9e2afc033 network/address: drop IPv6 settings when the kernel does not support IPv6 2023-07-30 22:53:15 +09:00
Susant Sahani f141b2c053 network: ndisc - Honour CurHopLimit
RFC4861 Neighbor Discovery – Sections 4.2 and 6.3.4

From section 4.2. Router Advertisement Message Format:

Cur Hop Limit        8-bit unsigned integer.  The default value that
                     should be placed in the Hop Count field of the IP
                     header for outgoing IP packets.  A value of zero
                     means unspecified (by this router).
2023-07-30 14:37:21 +01:00
Yu Watanabe 1a1f4a8092 network/address: merge address_needs_to_set_broadcast() with address_get_broadcast()
No functional change, preparation for later commits.
2023-07-30 14:33:23 +01:00
Luca Boccassi 9dabe36cb0 Merge pull request #28574 from yuwata/network-queue-next
network/queue: preparations
2023-07-30 14:27:43 +01:00
Luca Boccassi 1665bbbddf Merge pull request #28571 from yuwata/network-address-next-part1
network: several trivial cleanups
2023-07-30 14:01:53 +01:00
Yu Watanabe 4d4d7910d9 network/neighbor: drop IPv6 settings when the kernel does not support IPv6 2023-07-30 13:57:13 +01:00
Yu Watanabe 754252f923 network: rename sd_netlink_message* req -> m
This also merges neighbor_configure_message() with neighbor_configure().
2023-07-30 13:55:18 +01:00
Yu Watanabe 22b906dd96 Merge pull request #28564 from YHNdnzj/gpt-auto-kill-more-duplicate
gpt-auto: don't mount ESP if there's an fstab entry for it
2023-07-30 08:59:50 +09:00
Yu Watanabe 0c491d0f34 meson: use kwargs to declare efi binaries
No functional change, just refactoring.
2023-07-30 08:57:55 +09:00
Frantisek Sumsal 9fe4e68cab analyze: fix pcrs verb output without TPM support
If we don't have TPM support then `alg` is NULL and passing this to
table_new() means we'd get a table with only two columns instead of
three, leading up to a very confusing output:

$ build/systemd-analyze pcrs
System lacks full TPM2 support, not showing PCR state.
                 NR NAME
                  0 platform-code
                  - 1
    platform-config -
                  2 external-code
                  - 3
    external-config -
                  4 boot-loader-code
                  - 5
 boot-loader-config -
                  6 -
                  - 7
...

Let's name the header in this case with a simple dash, as it's going
to be hidden anyway, to make the table nice again:

$ build/systemd-analyze pcrs
System lacks full TPM2 support, not showing PCR state.
NR NAME
 0 platform-code
 1 platform-config
 2 external-code
 3 external-config
 4 boot-loader-code
 5 boot-loader-config
 6 -
 7 secure-boot-policy
...
2023-07-30 08:57:37 +09:00
Yu Watanabe 40c7d3c713 meson: unconditionally add version dependency for all executables and libraries
Otherwise, we can easily forget the dependency.
No functional change, just refactoring.
2023-07-30 05:36:22 +09:00
Yu Watanabe bdb577f545 tree-wide: drop unnecessary inclusion of version.h 2023-07-30 04:56:38 +09:00
Yu Watanabe 4122d68682 boot: always set SBAT_DISTRO_VERSION 2023-07-30 04:54:47 +09:00
Yu Watanabe e95acdfe1d meson: drop short script to generate vcs tag 2023-07-30 04:54:03 +09:00
Yu Watanabe cbcf76b193 tree-wide: fix typo 2023-07-30 00:23:28 +09:00
Yu Watanabe 008f1e5443 network/queue: detach request from queue when netlink reply received
Then, we can find and use the Request object after sending netlink
message.

Preparation for later commits.
2023-07-29 23:27:21 +09:00
Yu Watanabe d256945fd0 network/queue: free assigned userdata only when a new request is queued 2023-07-29 23:27:19 +09:00
Yu Watanabe a2532c9db8 network/address: split-out address_match_null()
No functional change, preparation for later commits.
2023-07-29 22:48:49 +09:00
Yu Watanabe a3a25d01ce network: drop unnecessary conditions
When link_get_by_index() succeeds, the result is always non-NULL.
2023-07-29 22:48:49 +09:00
Yu Watanabe 5fb1f929d5 network: use address_remove_and_drop() 2023-07-29 22:48:49 +09:00
Yu Watanabe f60e65583e network/address: free Address object by caller that passed to link_request_address()
Follow-up for 9684a8ded0.

Now, the input Address object is always copied, hence it is not
necessary to free it in link_request_address().
2023-07-29 22:48:49 +09:00
Yu Watanabe 3327877ca3 udev-builtin-net_id: make parse_hotplug_slot_from_function_id() always set return value on success
This also updates comment in the code.
2023-07-29 22:14:24 +09:00
Yu Watanabe ace308a73e udev-builtin-net_id: make names_xen() self-contained
It is not necessary to store its partial result into NetNames.

No functional changes, just refactoring.
2023-07-29 22:14:24 +09:00
Yu Watanabe bc710857d1 udev-builtin-net_id: use sd_device_get_sysnum() to get index of netdevsim 2023-07-29 22:14:24 +09:00
Yu Watanabe f7abd9ede8 udev-builtin-net_id: make names_netdevsim() self-contained
It is not necessary to store its partial result into NetNames.

No functional changes, just refactoring.
2023-07-29 22:14:24 +09:00
Yu Watanabe 28141620d9 udev-builtin-net_id: do not assume the current ifname is ethX
Otherwise, `udevadm test-builtin` may not work.
2023-07-29 22:14:24 +09:00
Yu Watanabe 0bf8330d68 udev-builtin-net_id: make names_platform() self-contained
It is not necessary to store its partial result into NetNames.

No functional changes, just refactoring.
2023-07-29 22:14:24 +09:00
Yu Watanabe ded2b1d093 udev-builtin-net_id: do not assume the current interface name is ethX
Otherwise, `udevadm test-builtin` does not work as expected.
2023-07-29 22:14:24 +09:00
Yu Watanabe 07e1841eb9 udev-builtin-net_id: make names_vio() self-contained
It is not necessary to store its partial result in NetNames.

No functional changes, just refactoring.
2023-07-29 22:14:24 +09:00
Yu Watanabe 80cd180807 udev-builtin-net_id: make names_ccw() self-contained
It is not necessary to store its partial result in NetNames.

No functional changes, just refactoring.
2023-07-29 22:14:24 +09:00
Yu Watanabe a4f097e934 udev-builtin-net_id: make dev_devicetree_onboard() self-contained
and rename it to names_devicetree().

No functional changes, just refactoring.
2023-07-29 22:14:24 +09:00
Yu Watanabe 1ec6c448c5 udev-builtin-net_id: make names_mac() self-contained
The MAC address is only used by names_mac() and ieee_oui(). Let's parse
it in names_mac() and drop it from LinkInfo.

No functional changes, just refactoring.
2023-07-29 22:14:23 +09:00
Yu Watanabe 01455a0723 udev-builtin-net_id: split out get_ifname_prefix()
No functional changes, just refactoring.
2023-07-29 22:14:23 +09:00
Yu Watanabe 2a62da02cc udev-builtin-net_id: swap arguments for streq() and friends 2023-07-29 22:14:23 +09:00
Yu Watanabe ac13209e2c udev-builtin-net_id: drop unused value from NetNameType 2023-07-29 22:14:23 +09:00
Yu Watanabe 4445242a1e chase: propagate error in dir_fd_is_root()
Otherwise, if it fails, chaseat() may return unexpected result and
triggers an assertion in chase().
2023-07-29 22:09:32 +09:00
Yu Watanabe 83c57d8cde chase: check root path in more detail
In chaseat() we call dir_fd_is_root() several places, and the final
result depends on it. If the root path specified to `chase()` is not
normalized but points to "/", e.g. "/../", assertions in `chaseat()` or
`chase()` may be triggered.
2023-07-29 22:09:28 +09:00
Yu Watanabe 4de5b4e375 chase: carefully handle result of extracting parent directory
Should not change any behavior.
2023-07-29 21:58:30 +09:00
Yu Watanabe 1c13bdf342 chase: add two more assertions
When 'need_absolute' is true, 'done' should always contain "/" at the
beginning, and thus should not be NULL.
2023-07-29 21:58:30 +09:00
Yu Watanabe b7e957d30f chase: drop CHASE_AT_RESOLVE_IN_ROOT earlier
The flag will be anyway dropped in chaseat(), but let's shortcut.
2023-07-29 21:58:29 +09:00
Yu Watanabe 5f0bae7bff chase: fix CHASE_STEP with ".." 2023-07-29 21:58:29 +09:00
Yu Watanabe 00a050b395 chase: reuse "done" to open fd of starting point
For readability that 'done' and 'fd' are always consistent with each other.

- dir_fd == AT_FDCWD:
  - path is absolute:
    - previous: fd = open("/")
    - current:  fd = openat(AT_FDCWD, "/")
  - path is relative:
    - previous: fd = openat(AT_FDCWD, ".")
    - current:  fd = openat(AT_FDCWD, ".")
- dir_fd >= 0:
  - dir_fd points to "/":
    - previous: fd = openat(dir_fd, ".")
    - current:  fd = openat(dir_fd, "/")
  - dir_fd does not point to "/":
    - previous: fd = openat(dir_fd, ".")
    - current:  fd = openat(dir_fd, ".")

Hence, this should not change any behavior. Just refactoring.
2023-07-29 21:58:29 +09:00
Yu Watanabe ae85704760 Merge pull request #28562 from yuwata/ukify-option-length
ukify: check option length
2023-07-29 21:41:27 +09:00
Yu Watanabe 73a89c5601 Merge pull request #28563 from keszybz/configure-meson
configure: update meson invocation
2023-07-29 21:40:58 +09:00
Zbigniew Jędrzejewski-Szmek 79ce5f940e labeller: add build-system label 2023-07-29 14:11:14 +02:00
Zbigniew Jędrzejewski-Szmek 4f3c90acfe configure: update meson invocation
New meson says:
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.

Inspired by https://github.com/systemd/systemd/issues/28482.
2023-07-29 14:08:06 +02:00