mirror of
https://github.com/systemd/systemd
synced 2026-04-13 10:35:08 +02:00
Compare commits
No commits in common. "adc1b76c30940da2f3fb11275f5b0e54ebbcd7f1" and "8a592c6fc298a025432b051cfb895886dee38ba3" have entirely different histories.
adc1b76c30
...
8a592c6fc2
1
.github/workflows/unit_tests.sh
vendored
1
.github/workflows/unit_tests.sh
vendored
@ -9,7 +9,6 @@ ADDITIONAL_DEPS=(
|
|||||||
expect
|
expect
|
||||||
fdisk
|
fdisk
|
||||||
jekyll
|
jekyll
|
||||||
libbpf-dev
|
|
||||||
libfdisk-dev
|
libfdisk-dev
|
||||||
libfido2-dev
|
libfido2-dev
|
||||||
libp11-kit-dev
|
libp11-kit-dev
|
||||||
|
|||||||
@ -34,7 +34,6 @@ Most generic unit settings are available for transient units.
|
|||||||
✓ PropagatesReloadTo=
|
✓ PropagatesReloadTo=
|
||||||
✓ ReloadPropagatedFrom=
|
✓ ReloadPropagatedFrom=
|
||||||
✓ PartOf=
|
✓ PartOf=
|
||||||
✓ Upholds=
|
|
||||||
✓ JoinsNamespaceOf=
|
✓ JoinsNamespaceOf=
|
||||||
✓ RequiresMountsFor=
|
✓ RequiresMountsFor=
|
||||||
✓ StopWhenUnneeded=
|
✓ StopWhenUnneeded=
|
||||||
|
|||||||
@ -196,13 +196,6 @@
|
|||||||
by using the <keycap>f</keycap> key.</para></listitem>
|
by using the <keycap>f</keycap> key.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>beep</term>
|
|
||||||
|
|
||||||
<listitem><para>Beep once as soon as the boot menu is shown (default disabled). Currently,
|
|
||||||
only x86 is supported, where it uses the PC speaker.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>reboot-for-bitlocker</term>
|
<term>reboot-for-bitlocker</term>
|
||||||
|
|
||||||
|
|||||||
@ -1649,8 +1649,6 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
|
|||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as PartOf = ['...', ...];
|
readonly as PartOf = ['...', ...];
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as Upholds = ['...', ...];
|
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
|
||||||
readonly as RequiredBy = ['...', ...];
|
readonly as RequiredBy = ['...', ...];
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as RequisiteOf = ['...', ...];
|
readonly as RequisiteOf = ['...', ...];
|
||||||
@ -1659,8 +1657,6 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
|
|||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as BoundBy = ['...', ...];
|
readonly as BoundBy = ['...', ...];
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as UpheldBy = ['...', ...];
|
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
|
||||||
readonly as ConsistsOf = ['...', ...];
|
readonly as ConsistsOf = ['...', ...];
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as Conflicts = ['...', ...];
|
readonly as Conflicts = ['...', ...];
|
||||||
@ -1671,14 +1667,14 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
|
|||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as After = ['...', ...];
|
readonly as After = ['...', ...];
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as OnSuccess = ['...', ...];
|
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
|
||||||
readonly as OnSuccessOf = ['...', ...];
|
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
|
||||||
readonly as OnFailure = ['...', ...];
|
readonly as OnFailure = ['...', ...];
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as OnFailureOf = ['...', ...];
|
readonly as OnFailureOf = ['...', ...];
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
|
readonly as OnSuccess = ['...', ...];
|
||||||
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
|
readonly as OnSuccessOf = ['...', ...];
|
||||||
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as Triggers = ['...', ...];
|
readonly as Triggers = ['...', ...];
|
||||||
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
|
||||||
readonly as TriggeredBy = ['...', ...];
|
readonly as TriggeredBy = ['...', ...];
|
||||||
@ -1824,20 +1820,16 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
|
|||||||
|
|
||||||
<!--property PartOf is not documented!-->
|
<!--property PartOf is not documented!-->
|
||||||
|
|
||||||
<!--property Upholds is not documented!-->
|
|
||||||
|
|
||||||
<!--property RequisiteOf is not documented!-->
|
<!--property RequisiteOf is not documented!-->
|
||||||
|
|
||||||
<!--property UpheldBy is not documented!-->
|
|
||||||
|
|
||||||
<!--property ConsistsOf is not documented!-->
|
<!--property ConsistsOf is not documented!-->
|
||||||
|
|
||||||
|
<!--property OnFailureOf is not documented!-->
|
||||||
|
|
||||||
<!--property OnSuccess is not documented!-->
|
<!--property OnSuccess is not documented!-->
|
||||||
|
|
||||||
<!--property OnSuccessOf is not documented!-->
|
<!--property OnSuccessOf is not documented!-->
|
||||||
|
|
||||||
<!--property OnFailureOf is not documented!-->
|
|
||||||
|
|
||||||
<!--property ReloadPropagatedFrom is not documented!-->
|
<!--property ReloadPropagatedFrom is not documented!-->
|
||||||
|
|
||||||
<!--property PropagatesStopTo is not documented!-->
|
<!--property PropagatesStopTo is not documented!-->
|
||||||
@ -1956,8 +1948,6 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
|
|||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="PartOf"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="PartOf"/>
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="Upholds"/>
|
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="RequiredBy"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="RequiredBy"/>
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="RequisiteOf"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="RequisiteOf"/>
|
||||||
@ -1966,8 +1956,6 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
|
|||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="BoundBy"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="BoundBy"/>
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="UpheldBy"/>
|
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="ConsistsOf"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="ConsistsOf"/>
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="Conflicts"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="Conflicts"/>
|
||||||
@ -1978,14 +1966,14 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
|
|||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="After"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="After"/>
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="OnSuccess"/>
|
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="OnSuccessOf"/>
|
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="OnFailure"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="OnFailure"/>
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="OnFailureOf"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="OnFailureOf"/>
|
||||||
|
|
||||||
|
<variablelist class="dbus-property" generated="True" extra-ref="OnSuccess"/>
|
||||||
|
|
||||||
|
<variablelist class="dbus-property" generated="True" extra-ref="OnSuccessOf"/>
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="Triggers"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="Triggers"/>
|
||||||
|
|
||||||
<variablelist class="dbus-property" generated="True" extra-ref="TriggeredBy"/>
|
<variablelist class="dbus-property" generated="True" extra-ref="TriggeredBy"/>
|
||||||
|
|||||||
@ -1575,14 +1575,14 @@
|
|||||||
<term><varname>RouteTable=</varname></term>
|
<term><varname>RouteTable=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The table identifier for the routes to the addresses specified in the
|
<para>The table identifier for the routes to the addresses specified in the
|
||||||
<varname>AllowedIPs=</varname>. Takes a negative boolean value, one of the predefined names
|
<varname>AllowedIPs=</varname>. Takes the special value <literal>off</literal>, one of the
|
||||||
<literal>default</literal>, <literal>main</literal>, and <literal>local</literal>, names
|
predefined names <literal>default</literal>, <literal>main</literal>, and
|
||||||
defined in <varname>RouteTable=</varname> in
|
<literal>local</literal>, names defined in <varname>RouteTable=</varname> in
|
||||||
<citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
or a number in the range 1…4294967295. When <literal>off</literal> the routes to the
|
or a number in the range 1…4294967295. When <literal>off</literal> the routes to the
|
||||||
addresses specified in the <varname>AllowedIPs=</varname> setting will not be configured.
|
addresses specified in the <varname>AllowedIPs=</varname> setting will not be configured.
|
||||||
Defaults to false. This setting will be ignored when the same setting is specified in the
|
Defaults to <literal>main</literal>. This setting will be ignored when the same setting is
|
||||||
[WireGuardPeer] section.</para>
|
specified in the [WireGuardPeer] section.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -1682,9 +1682,9 @@
|
|||||||
<term><varname>RouteTable=</varname></term>
|
<term><varname>RouteTable=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The table identifier for the routes to the addresses specified in the
|
<para>The table identifier for the routes to the addresses specified in the
|
||||||
<varname>AllowedIPs=</varname>. Takes a negative boolean value, one of the predefined names
|
<varname>AllowedIPs=</varname>. Takes the special value <literal>off</literal>, one of the
|
||||||
<literal>default</literal>, <literal>main</literal>, and <literal>local</literal>, names
|
predefined names <literal>default</literal>, <literal>main</literal>, and
|
||||||
defined in <varname>RouteTable=</varname> in
|
<literal>local</literal>, names defined in <varname>RouteTable=</varname> in
|
||||||
<citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
or a number in the range 1…4294967295. Defaults to unset, and the value specified in the
|
or a number in the range 1…4294967295. Defaults to unset, and the value specified in the
|
||||||
same setting in the [WireGuard] section will be used.</para>
|
same setting in the [WireGuard] section will be used.</para>
|
||||||
|
|||||||
@ -89,7 +89,6 @@ typedef struct {
|
|||||||
BOOLEAN force_menu;
|
BOOLEAN force_menu;
|
||||||
BOOLEAN use_saved_entry;
|
BOOLEAN use_saved_entry;
|
||||||
BOOLEAN use_saved_entry_efivar;
|
BOOLEAN use_saved_entry_efivar;
|
||||||
BOOLEAN beep;
|
|
||||||
INT64 console_mode;
|
INT64 console_mode;
|
||||||
INT64 console_mode_efivar;
|
INT64 console_mode_efivar;
|
||||||
RandomSeedMode random_seed_mode;
|
RandomSeedMode random_seed_mode;
|
||||||
@ -498,7 +497,6 @@ static void print_status(Config *config, CHAR16 *loaded_image_path) {
|
|||||||
ps_bool(L" editor: %s\n", config->editor);
|
ps_bool(L" editor: %s\n", config->editor);
|
||||||
ps_bool(L" auto-entries: %s\n", config->auto_entries);
|
ps_bool(L" auto-entries: %s\n", config->auto_entries);
|
||||||
ps_bool(L" auto-firmware: %s\n", config->auto_firmware);
|
ps_bool(L" auto-firmware: %s\n", config->auto_firmware);
|
||||||
ps_bool(L" beep: %s\n", config->beep);
|
|
||||||
ps_bool(L" reboot-for-bitlocker: %s\n", config->reboot_for_bitlocker);
|
ps_bool(L" reboot-for-bitlocker: %s\n", config->reboot_for_bitlocker);
|
||||||
ps_string(L" random-seed-mode: %s\n", random_seed_modes_table[config->random_seed_mode]);
|
ps_string(L" random-seed-mode: %s\n", random_seed_modes_table[config->random_seed_mode]);
|
||||||
|
|
||||||
@ -590,7 +588,7 @@ static BOOLEAN menu_run(
|
|||||||
_cleanup_freepool_ CHAR16 *clearline = NULL, *status = NULL;
|
_cleanup_freepool_ CHAR16 *clearline = NULL, *status = NULL;
|
||||||
UINT32 timeout_efivar_saved = config->timeout_sec_efivar;
|
UINT32 timeout_efivar_saved = config->timeout_sec_efivar;
|
||||||
UINT32 timeout_remain = config->timeout_sec == TIMEOUT_MENU_FORCE ? 0 : config->timeout_sec;
|
UINT32 timeout_remain = config->timeout_sec == TIMEOUT_MENU_FORCE ? 0 : config->timeout_sec;
|
||||||
BOOLEAN exit = FALSE, run = TRUE, firmware_setup = FALSE, do_beep = config->beep;
|
BOOLEAN exit = FALSE, run = TRUE, firmware_setup = FALSE;
|
||||||
INT64 console_mode_initial = ST->ConOut->Mode->Mode, console_mode_efivar_saved = config->console_mode_efivar;
|
INT64 console_mode_initial = ST->ConOut->Mode->Mode, console_mode_efivar_saved = config->console_mode_efivar;
|
||||||
UINTN default_efivar_saved = config->idx_default_efivar;
|
UINTN default_efivar_saved = config->idx_default_efivar;
|
||||||
|
|
||||||
@ -727,11 +725,6 @@ static BOOLEAN menu_run(
|
|||||||
ST->ConOut->OutputString(ST->ConOut, clearline + 1 + x + len);
|
ST->ConOut->OutputString(ST->ConOut, clearline + 1 + x + len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_beep) {
|
|
||||||
beep();
|
|
||||||
do_beep = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = console_key_read(&key, timeout_remain > 0 ? 1000 * 1000 : UINT64_MAX);
|
err = console_key_read(&key, timeout_remain > 0 ? 1000 * 1000 : UINT64_MAX);
|
||||||
if (err == EFI_TIMEOUT) {
|
if (err == EFI_TIMEOUT) {
|
||||||
timeout_remain--;
|
timeout_remain--;
|
||||||
@ -1151,12 +1144,6 @@ static void config_defaults_load_from_file(Config *config, CHAR8 *content) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmpa((CHAR8 *)"beep", key) == 0) {
|
|
||||||
err = parse_boolean(value, &config->beep);
|
|
||||||
if (EFI_ERROR(err))
|
|
||||||
log_error_stall(L"Error parsing 'beep' config option: %a", value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmpa((CHAR8 *)"reboot-for-bitlocker", key) == 0) {
|
if (strcmpa((CHAR8 *)"reboot-for-bitlocker", key) == 0) {
|
||||||
err = parse_boolean(value, &config->reboot_for_bitlocker);
|
err = parse_boolean(value, &config->reboot_for_bitlocker);
|
||||||
if (EFI_ERROR(err))
|
if (EFI_ERROR(err))
|
||||||
|
|||||||
@ -757,46 +757,3 @@ __attribute__((noinline)) void debug_break(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__i386__) || defined(__x86_64__)
|
|
||||||
static inline UINT8 inb(UINT16 port) {
|
|
||||||
UINT8 value;
|
|
||||||
asm volatile("inb %1, %0" : "=a"(value) : "Nd"(port));
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void outb(UINT16 port, UINT8 value) {
|
|
||||||
asm volatile("outb %0, %1" : : "a"(value), "Nd"(port));
|
|
||||||
}
|
|
||||||
|
|
||||||
void beep(void) {
|
|
||||||
enum {
|
|
||||||
PITCH = 500,
|
|
||||||
DURATION_USEC = 100 * 1000,
|
|
||||||
|
|
||||||
PIT_FREQUENCY = 0x1234dd,
|
|
||||||
SPEAKER_CONTROL_PORT = 0x61,
|
|
||||||
SPEAKER_ON_MASK = 0x03,
|
|
||||||
TIMER_PORT_MAGIC = 0xB6,
|
|
||||||
TIMER_CONTROL_PORT = 0x43,
|
|
||||||
TIMER_CONTROL2_PORT = 0x42,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Set frequency. */
|
|
||||||
UINT32 counter = PIT_FREQUENCY / PITCH;
|
|
||||||
outb(TIMER_CONTROL_PORT, TIMER_PORT_MAGIC);
|
|
||||||
outb(TIMER_CONTROL2_PORT, counter & 0xFF);
|
|
||||||
outb(TIMER_CONTROL2_PORT, (counter >> 8) & 0xFF);
|
|
||||||
|
|
||||||
/* Turn speaker on. */
|
|
||||||
UINT8 value = inb(SPEAKER_CONTROL_PORT);
|
|
||||||
value |= SPEAKER_ON_MASK;
|
|
||||||
outb(SPEAKER_CONTROL_PORT, value);
|
|
||||||
|
|
||||||
BS->Stall(DURATION_USEC);
|
|
||||||
|
|
||||||
/* Turn speaker off. */
|
|
||||||
value &= ~SPEAKER_ON_MASK;
|
|
||||||
outb(SPEAKER_CONTROL_PORT, value);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|||||||
@ -169,9 +169,3 @@ extern UINT8 _text, _data;
|
|||||||
#else
|
#else
|
||||||
# define debug_hook(identity)
|
# define debug_hook(identity)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__i386__) || defined(__x86_64__)
|
|
||||||
void beep(void);
|
|
||||||
#else
|
|
||||||
static inline void beep(void) {}
|
|
||||||
#endif
|
|
||||||
|
|||||||
@ -872,21 +872,19 @@ const sd_bus_vtable bus_unit_vtable[] = {
|
|||||||
SD_BUS_PROPERTY("Wants", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("Wants", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("BindsTo", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("BindsTo", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("PartOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("PartOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("Upholds", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
|
||||||
SD_BUS_PROPERTY("RequiredBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("RequiredBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("RequisiteOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("RequisiteOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("WantedBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("WantedBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("BoundBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("BoundBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("UpheldBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
|
||||||
SD_BUS_PROPERTY("ConsistsOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("ConsistsOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("Conflicts", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("Conflicts", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("ConflictedBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("ConflictedBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("Before", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("Before", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("After", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("After", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("OnSuccess", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
|
||||||
SD_BUS_PROPERTY("OnSuccessOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
|
||||||
SD_BUS_PROPERTY("OnFailure", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("OnFailure", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("OnFailureOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("OnFailureOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
|
SD_BUS_PROPERTY("OnSuccess", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
|
SD_BUS_PROPERTY("OnSuccessOf", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("Triggers", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("Triggers", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("TriggeredBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("TriggeredBy", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
SD_BUS_PROPERTY("PropagatesReloadTo", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
SD_BUS_PROPERTY("PropagatesReloadTo", "as", property_get_dependencies, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||||
|
|||||||
@ -19,12 +19,9 @@ static struct restrict_ifaces_bpf *restrict_ifaces_bpf_free(struct restrict_ifac
|
|||||||
|
|
||||||
DEFINE_TRIVIAL_CLEANUP_FUNC(struct restrict_ifaces_bpf *, restrict_ifaces_bpf_free);
|
DEFINE_TRIVIAL_CLEANUP_FUNC(struct restrict_ifaces_bpf *, restrict_ifaces_bpf_free);
|
||||||
|
|
||||||
static int prepare_restrict_ifaces_bpf(
|
static int prepare_restrict_ifaces_bpf(Unit* u, bool is_allow_list,
|
||||||
Unit* u,
|
|
||||||
bool is_allow_list,
|
|
||||||
const Set *restrict_network_interfaces,
|
const Set *restrict_network_interfaces,
|
||||||
struct restrict_ifaces_bpf **ret_object) {
|
struct restrict_ifaces_bpf **ret_object) {
|
||||||
|
|
||||||
_cleanup_(restrict_ifaces_bpf_freep) struct restrict_ifaces_bpf *obj = NULL;
|
_cleanup_(restrict_ifaces_bpf_freep) struct restrict_ifaces_bpf *obj = NULL;
|
||||||
_cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL;
|
_cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL;
|
||||||
char *iface;
|
char *iface;
|
||||||
@ -53,10 +50,9 @@ static int prepare_restrict_ifaces_bpf(
|
|||||||
SET_FOREACH(iface, restrict_network_interfaces) {
|
SET_FOREACH(iface, restrict_network_interfaces) {
|
||||||
uint8_t dummy = 0;
|
uint8_t dummy = 0;
|
||||||
int ifindex;
|
int ifindex;
|
||||||
|
|
||||||
ifindex = rtnl_resolve_interface(&rtnl, iface);
|
ifindex = rtnl_resolve_interface(&rtnl, iface);
|
||||||
if (ifindex < 0) {
|
if (ifindex < 0) {
|
||||||
log_unit_warning_errno(u, ifindex, "Couldn't find index of network interface '%s', ignoring: %m", iface);
|
log_unit_warning_errno(u, ifindex, "Couldn't find index of network interface: %m. Ignoring '%s'", iface);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -895,8 +895,13 @@ int config_parse_wireguard_route_table(
|
|||||||
assert(data);
|
assert(data);
|
||||||
assert(userdata);
|
assert(userdata);
|
||||||
|
|
||||||
if (isempty(rvalue) || parse_boolean(rvalue) == 0) {
|
if (isempty(rvalue)) {
|
||||||
*table = 0; /* Disabled. */
|
*table = RT_TABLE_MAIN;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (streq(rvalue, "off")) {
|
||||||
|
*table = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -947,7 +952,7 @@ int config_parse_wireguard_peer_route_table(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parse_boolean(rvalue) == 0) {
|
if (streq(rvalue, "off")) {
|
||||||
peer->route_table = 0; /* Disabled. */
|
peer->route_table = 0; /* Disabled. */
|
||||||
peer->route_table_set = true;
|
peer->route_table_set = true;
|
||||||
TAKE_PTR(peer);
|
TAKE_PTR(peer);
|
||||||
@ -1056,6 +1061,7 @@ static void wireguard_init(NetDev *netdev) {
|
|||||||
assert(w);
|
assert(w);
|
||||||
|
|
||||||
w->flags = WGDEVICE_F_REPLACE_PEERS;
|
w->flags = WGDEVICE_F_REPLACE_PEERS;
|
||||||
|
w->route_table = RT_TABLE_MAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wireguard_done(NetDev *netdev) {
|
static void wireguard_done(NetDev *netdev) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user