Commit Graph
55043 Commits
Author SHA1 Message Date
Yu Watanabe 73fc85227d sd-network: drop _public_ attribute
sd-network is not public yet.
2021-12-08 03:06:44 +09:00
Zbigniew Jędrzejewski-Szmek d4f8cd4d83 Merge pull request #21625 from yuwata/network-dhcp-6rd
network: dhcp: add 6rd support
2021-12-07 17:26:37 +01:00
Luca Boccassi f43282670b core: add StartUnitWithFlags DBUS method
When an activation job is skipped because of a Condition*= setting failing,
currently the JobRemoved signal lists 'done' as the result, just as with
a successful job.

This is a problem when doing dbus activation: dbus-broker will receive a
signal that says the job was successful, so then it moves into a state where
it waits for the requested name to appear on the bus, but that never happens
because the job was actually skipped.

Add a new StartUnitWithFlags that changes the behaviour of the JobRemoved
signal to list 'done' or 'skipped'.

Fixes #21520
2021-12-07 16:30:49 +01:00
Frantisek Sumsal 72af88f231 github: mention the systemd-devel ML in the new issue tab 2021-12-07 16:28:56 +01:00
Frantisek Sumsal 11f5f78c84 Merge pull request #21657 from mrc0mmand/codeql-shenanigans
ci: sync the list of CodeQL queries with LGTM
2021-12-07 15:28:48 +00:00
Frantisek Sumsal a3f0533ffc ci: pack-ify our custom CodeQL queries and enable them in Actions
Unlike LGTM, the CodeQL Action requires the custom queries to have their
own qlpack.yml file, so let's provide one.
2021-12-07 14:57:09 +01:00
Frantisek Sumsal a6319961c9 ci: run the CodeQL action also when its configuration changes
Just to make sure we didn't break anything.
2021-12-07 14:45:06 +01:00
Frantisek Sumsal 64f625a212 ci: sync the list of CodeQL queries with LGTM 2021-12-07 14:45:04 +01:00
Dan Streetman 526fce97af resolve: remove server 'large' level
This removes the DNS_SERVER_FEATURE_LEVEL_LARGE, and sets the EDNS0
advertised max packet size as if always in 'large' mode.

Without this, we always send out EDNS0 opts that limit response sizes
to 512 bytes, thus the remote server will never send anything larger
and will always truncate responses larger than 512 bytes, forcing us
to drop from EDNS0 down to TCP, even though one of the primary benefits
of EDNS0 is larger packet sizes.

Fixes: #20993
2021-12-07 14:20:47 +01:00
Frantisek Sumsal 394159498d ci: add a missing SPDX header 2021-12-07 14:15:04 +01:00
Zbigniew Jędrzejewski-Szmek 3944ef20f5 Merge pull request #21264 from medhefgo/boot-lto
sd-boot: LTO support
2021-12-07 12:58:59 +01:00
Yu Watanabe 42592d0ad4 test-network: support the case that the default config files are not installed yet 2021-12-07 20:33:20 +09:00
Yu Watanabe 84cc85f983 test-network: add test for 6rd 2021-12-07 20:33:20 +09:00
Yu Watanabe 31fc1366d6 man: network: document Use6RD= setting 2021-12-07 20:33:20 +09:00
Yu Watanabe e49bad0179 network: dhcp-pd: add 6rd support
Closes #19152.
2021-12-07 20:33:16 +09:00
Yu Watanabe dbdcaca3ab sd-dhcp-client: support 6rd option 2021-12-07 20:32:02 +09:00
Yu Watanabe 63dc602570 network: introduce link_remove() 2021-12-07 20:32:02 +09:00
Yu Watanabe a27588d4e7 network: dhcp-pd: rename [DHCPv6PrefixDelegation] -> [DHCPPrefixDelegation]
This just changes the names of settings, variables, functions, files, and so on.
No functionality is changed.

Preparation for supporting 6rd.
2021-12-07 20:30:30 +09:00
Yu Watanabe 5ed057b67b Merge pull request #21653 from yuwata/network-dhcp6pd-unreachable-route-cleanups
network: dhcp6pd: cleanups for unreachable route
2021-12-07 20:28:18 +09:00
Yu Watanabe 334f1a99f7 Merge pull request #21655 from yuwata/network-creating-enslaving-netdev-cleanups
network: cleanups for creating or enslaving netdevs
2021-12-07 20:21:47 +09:00
Yu Watanabe ab0c82d9f7 network: dhcp6pd: assign addresses in the delegated prefix instead of a subnet prefix /64 on upstream interface 2021-12-07 19:46:37 +09:00
Yu Watanabe 2747f1321d network: dhcp6pd: do not check Announce= setting when the link does not support RADV 2021-12-07 19:44:02 +09:00
Yu Watanabe 57c107544d network: fix memleak
Follow-up for ab106a609b.

Fixes CID#1467055.
2021-12-07 19:43:31 +09:00
Yu Watanabe 11d8a83f53 network: dhcp6pd: drop link_has_preferred_subnet_id() and inline condition 2021-12-07 19:43:06 +09:00
Yu Watanabe 557e1b5249 network: dhcp6pd: use the kernel's default value for priority of unreachable route
This should not change any behavior, as both values are equivalent.
2021-12-07 18:35:30 +09:00
Yu Watanabe 2d00239cbe network: dhcp6pd: always use main route table for unreachable route
This mostly reverts e47bcb7d0b.
2021-12-07 18:35:30 +09:00
Yu Watanabe 5ed10a194a network: dhcp6pd: set server address for unreachable route
This is just for json output.
2021-12-07 18:35:30 +09:00
Yu Watanabe a536ec3872 network: dhcp6pd: gracefully handle delegated prefix whose prefixlen is larger than 64 2021-12-07 18:35:26 +09:00
Zbigniew Jędrzejewski-Szmek 8b0bc54cdb Merge pull request #20522 from yuwata/cgroup-fix
core/cgroup: fix io.weight and blkio.weight
2021-12-07 10:24:44 +01:00
Evgeny Vereshchagin 4997d1b965 ci: pin python dependencies and let Dependabot keep track of them 2021-12-07 09:08:26 +00:00
Zbigniew Jędrzejewski-Szmek ed0e6f0f71 Merge pull request #21307 from medhefgo/boot-alloc
sd-boot: Non-failing allocators
2021-12-07 08:20:07 +01:00
Yu Watanabe 543240f593 network/netdev: drop spurious state from the condition to create stacked netdevs
Stacked netdevs are requested when the underlying interface is in
configuring state.
2021-12-07 15:58:25 +09:00
Yu Watanabe f7144e7b0f network/netdev: create stacked netdevs after all set-link operations are finished
E.g. setting MAC address must be done before creating VLAN interface.
2021-12-07 15:58:25 +09:00
Yu Watanabe 879377cad5 network: do not block configuring addresses by creating stacked netdevs
`link_is_ready_to_configure()` is used to judge we can configure
addresses, routes, and etc. And they can be configured independently of
stacked netdevs.
2021-12-07 15:58:25 +09:00
Yu Watanabe 5329a37935 network: set MAC address before enslaving to bond or bridge interface
As the master interface may inherit the slave MAC address.
2021-12-07 15:58:25 +09:00
Maciek Borzecki 0ddd608a6d units/systemd-udevd: allow bpf() syscall
Programs run by udev triggers may need to execute the bpf() syscall. Even more
so, since on a cgroup v2 system, the only way to set up device access filtering
is to install a BPF program on the cgroup in question and one way of passing
data to such program is through BPF maps, which can only be access using the
bpf() syscall. One such use case was identified in RHBZ#2025264 related to
snap-device-helper, and led to RHBZ#2027627 being filed.

Unfortunately there is no finer grained control over what gets passed in the
syscall, so just enable bpf() and leave fine grained mediation to other
security layers (eg. SELinux).

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2027627

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2021-12-07 07:37:54 +01:00
Zbigniew Jędrzejewski-Szmek f66d548c1a Merge pull request #21598 from DaanDeMeyer/journald-file
journal: Fix re-enabling COW for archived journal files on BTRFS
2021-12-07 07:35:34 +01:00
Yu Watanabe 45aa0e841b network,udev: do not adjust local assignment bit of specified MAC address
People often assigns the MAC address of the enslaved interface to e.g.
bridge interface. So, the local assignment bit should not be adjusted.

Fixes #21649.
2021-12-07 15:01:04 +09:00
Yu Watanabe f836390fa7 Merge pull request #21642 from yuwata/network-state-file-ignore-dynamic-when-dbus-entry-exists
network: state-file: ignore dynamic entries when specified by DBus method
2021-12-07 09:51:38 +09:00
Luca Boccassi 5328f80e92 Merge pull request #21646 from mrc0mmand/lgtm-followups
LGTM follow-ups
2021-12-07 00:14:45 +00:00
Luca Boccassi 3f88d5046f Merge pull request #21639 from yuwata/network-dhcp6pd-use-dhcp6_pd_prefix_acquired
network: dhcp6pd: use dhcp6 pd prefix acquired() and drop dhcp6_pd_distribute_prefix()
2021-12-07 00:14:04 +00:00
Yu Watanabe a0af85e02c Merge pull request #21196 from yuwata/process-util-nulstr
process-util: handle double NUL as the end of command line
2021-12-07 08:29:34 +09:00
Franck Bui 051ea718f2 TEST-10: don't attempt to write a byte to the socket
Writing a byte to test10.socket is actually the root cause of issue #19154:
depending on the timing, it's possible that PID1 closes the socket before socat
(or nc, it doesn't matter which tool is actually used) tries to write that one
byte to the socket. In this case writing to the socket returns EPIPE, which
causes socat to exit(1) and subsequently make the test fail.

Since we're only interested in connecting to the socket and triggering the rate
limit of the socket, this patch removes the parts that write the single byte to
the socket, which should remove the race for good.

Since it shouldn't matter whether the test uses socat or nc, let's switch back
to nc and hence remove the sole user of socat. The exit status of nc is however
ignored because some versions might choke when the socket is closed
unexpectedly.
2021-12-07 08:29:09 +09:00
dependabot[bot] 7285145dfc build(deps): bump github/codeql-action from 1.0.24 to 1.0.25
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.24 to 1.0.25.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e095058bfa09de8070f94e98f5dc059531bc6235...546b30f35ae5a3db0e0be1843008c2224f71c3b0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-07 02:20:53 +03:00
Yu Watanabe 56437e33a6 network: state-file: do not append dynamic entries when specified by DBus method
Fixes #21515.
2021-12-07 06:43:14 +09:00
Daan De Meyer d71ece3f0b journal: Fix disabling NO_COW on btrfs filesystems
Disabling NOCOW when data has been written to a file doesn't work.
Instead, when we're done writing to a journal file (after archiving),
let's rewrite the file with COW enabled. This also takes care of
properly defragmenting the file.

With zstd compression level 3, journal files are compressed to 12%
of their original size with default journal settings.

As rewriting the file might take a while since we also do an fsync()
after the rewrite, this work is done in the offline thread to avoid
blocking the journald event loop.
2021-12-06 22:17:41 +01:00
Daan De Meyer 5a980196ab basic: Make sure we're extra paranoid in chattr_full
On btrfs, trying to disable FS_NOCOW_FL on a file that has data
already written will fail silently without reporting an error. To
catch such cases, let's query the flags again if the IOC_SETFLAGS
ioctl() succeeds to make sure the flags we tried to configure we're
actually accepted by the kernel.
2021-12-06 22:17:40 +01:00
Daan De Meyer 461955ef4c journal: Update the JournalFile path when archiving
When we archive a path, we rename the file to indicate this. However,
until now, we didn't actually update the path member of the corresponding
JournalFile instance. Let's make sure we also update this to avoid
misuse of the old path later on.

This change also requires we save the previous path in journal_file_rotate()
since we need to open a new file at the previous path.
2021-12-06 22:17:40 +01:00
Daan De Meyer bea29a4296 mkosi: Add compsize to list of installed packages on Fedora
compsize is useful to check the compression ratio of journal files
on filesystems that support compression such as BTRFS.
2021-12-06 22:17:40 +01:00
Daan De Meyer e5f14b1eb8 mkosi: Add e2fsprogs to installed packages for Fedora
lsattr is useful to check chattr flags on files.
2021-12-06 22:17:40 +01:00