1
0
mirror of https://github.com/systemd/systemd synced 2026-03-06 13:15:06 +01:00

Compare commits

..

3 Commits

Author SHA1 Message Date
Yu Watanabe
8786d4bbe4 journal-importer: ignore invalid field at one more place
Fixes oss-fuzz#28817.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28817
2020-12-21 12:40:44 +00:00
Luca BRUNO
3d909037e3 man/localtime: document default timezone
This explicitly documents the default `UTC` timezone which is used
by systemd and (other softwares) when `/etc/localtime` is not present.

Ref: https://github.com/systemd/systemd/blob/v247/src/basic/time-util.c#L1460-L1469
2020-12-21 12:39:18 +00:00
Florian Klink
c6b90e5c5e man/systemd.netdev: clarify the wireguard AllowedIPs= setting
`AllowedIPs=` only affects "routing inside the network interface
itself", as in, which wireguard peer packets with a specific destination
address are sent to, and what source addresses are accepted from which
peer.

To cause packets to be sent via wireguard in first place, a route via
that interface needs to be added - either in the `[Routes]` section on
the `.network` matching the wireguard interface, or outside of networkd.

This is a common cause of misunderstanding, because tools like wg-quick
also add routes to the interface. However, those tools are meant as a
"extremely simple script for easily bringing up a WireGuard interface,
suitable for a few common use cases (from their manpage).

Networkd also should support other usecases - like setting AllowedIPs to
0.0.0.0/0 and ::/0 and having a dynamic routing protocol setting more
specific routes (or the user manually setting them).

Reported-In: https://github.com/systemd/systemd/issues/14176
2020-12-21 15:47:00 +09:00
4 changed files with 23 additions and 3 deletions

View File

@ -41,6 +41,9 @@
symlink target name of <filename>/etc/localtime</filename>, this symlink target name of <filename>/etc/localtime</filename>, this
file may not be a normal file or hardlink.</para> file may not be a normal file or hardlink.</para>
<para>If <filename>/etc/localtime</filename> is missing, the
default <literal>UTC</literal> timezone is used.</para>
<para>The timezone may be overridden for individual programs by <para>The timezone may be overridden for individual programs by
using the <varname>$TZ</varname> environment variable. See using the <varname>$TZ</varname> environment variable. See
<citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>

View File

@ -1629,9 +1629,16 @@
<listitem> <listitem>
<para>Sets a comma-separated list of IP (v4 or v6) addresses with CIDR masks <para>Sets a comma-separated list of IP (v4 or v6) addresses with CIDR masks
from which this peer is allowed to send incoming traffic and to from which this peer is allowed to send incoming traffic and to
which outgoing traffic for this peer is directed. The catch-all which outgoing traffic for this peer is directed.</para>
0.0.0.0/0 may be specified for matching all IPv4 addresses, and <para>The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses,
::/0 may be specified for matching all IPv6 addresses. </para> and ::/0 may be specified for matching all IPv6 addresses.</para>
<para>Note that this only affects "routing inside the network interface itself",
as in, which wireguard peer packets with a specific destination address are sent to,
and what source addresses are accepted from which peer.</para>
<para>To cause packets to be sent via wireguard in first place, a route needs
to be added, as well - either in the <literal>[Routes]</literal> section on the
<literal>.network</literal> matching the wireguard interface, or outside of networkd.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -334,6 +334,16 @@ int journal_importer_process_data(JournalImporter *imp) {
if (r < 0) if (r < 0)
return r; return r;
} else { } else {
if (!journal_field_valid(line, n - 1, true)) {
char buf[64], *t;
t = strndupa(line, n - 1);
log_debug("Ignoring invalid field: \"%s\"",
cellescape(buf, sizeof buf, t));
return 0;
}
/* replace \n with = */ /* replace \n with = */
line[n-1] = '='; line[n-1] = '=';

Binary file not shown.