Compare commits

..

No commits in common. "c83a5ead31d5813537e6d73aae99169ecd1f76bd" and "6829d8ce6927c151e4391c6a5e69b76906fbd2be" have entirely different histories.

29 changed files with 59 additions and 542 deletions

View File

@ -259,20 +259,6 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR)
<listitem><para>Deletes virtual netdevs. Takes interface name or index number.</para></listitem> <listitem><para>Deletes virtual netdevs. Takes interface name or index number.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<command>up</command>
</term>
<listitem><para>Bring devices up. Takes interface name or index number.</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>down</command>
</term>
<listitem><para>Bring devices down. Takes interface name or index number.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<command>renew</command> <command>renew</command>

View File

@ -18,9 +18,7 @@
<refnamediv> <refnamediv>
<refname>sd_bus_call_method</refname> <refname>sd_bus_call_method</refname>
<refname>sd_bus_call_methodv</refname>
<refname>sd_bus_call_method_async</refname> <refname>sd_bus_call_method_async</refname>
<refname>sd_bus_call_method_asyncv</refname>
<refpurpose>Initialize a bus message object and invoke the corresponding D-Bus method call <refpurpose>Initialize a bus message object and invoke the corresponding D-Bus method call
</refpurpose> </refpurpose>
@ -43,19 +41,6 @@
<paramdef>...</paramdef> <paramdef>...</paramdef>
</funcprototype> </funcprototype>
<funcprototype>
<funcdef>int <function>sd_bus_call_methodv</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>destination</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char *<parameter>interface</parameter></paramdef>
<paramdef>const char *<parameter>member</parameter></paramdef>
<paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
<paramdef>sd_bus_message **<parameter>reply</parameter></paramdef>
<paramdef>const char *<parameter>types</parameter></paramdef>
<paramdef>va_list <parameter>ap</parameter></paramdef>
</funcprototype>
<funcprototype> <funcprototype>
<funcdef>int <function>sd_bus_call_method_async</function></funcdef> <funcdef>int <function>sd_bus_call_method_async</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef> <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
@ -69,20 +54,6 @@
<paramdef>const char *<parameter>types</parameter></paramdef> <paramdef>const char *<parameter>types</parameter></paramdef>
<paramdef>...</paramdef> <paramdef>...</paramdef>
</funcprototype> </funcprototype>
<funcprototype>
<funcdef>int <function>sd_bus_call_method_asyncv</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>sd_bus_slot **<parameter>slot</parameter></paramdef>
<paramdef>const char *<parameter>destination</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char *<parameter>interface</parameter></paramdef>
<paramdef>const char *<parameter>member</parameter></paramdef>
<paramdef>sd_bus_message_handler_t <parameter>callback</parameter></paramdef>
<paramdef>void *<parameter>userdata</parameter></paramdef>
<paramdef>const char *<parameter>types</parameter></paramdef>
<paramdef>va_list <parameter>ap</parameter></paramdef>
</funcprototype>
</funcsynopsis> </funcsynopsis>
</refsynopsisdiv> </refsynopsisdiv>

View File

@ -19,10 +19,8 @@
<refnamediv> <refnamediv>
<refname>sd_bus_reply_method_error</refname> <refname>sd_bus_reply_method_error</refname>
<refname>sd_bus_reply_method_errorf</refname> <refname>sd_bus_reply_method_errorf</refname>
<refname>sd_bus_reply_method_errorfv</refname>
<refname>sd_bus_reply_method_errno</refname> <refname>sd_bus_reply_method_errno</refname>
<refname>sd_bus_reply_method_errnof</refname> <refname>sd_bus_reply_method_errnof</refname>
<refname>sd_bus_reply_method_errnofv</refname>
<refpurpose>Reply with an error to a D-Bus method call</refpurpose> <refpurpose>Reply with an error to a D-Bus method call</refpurpose>
</refnamediv> </refnamediv>
@ -42,15 +40,7 @@
<paramdef>sd_bus_message *<parameter>call</parameter></paramdef> <paramdef>sd_bus_message *<parameter>call</parameter></paramdef>
<paramdef>const char *<parameter>name</parameter></paramdef> <paramdef>const char *<parameter>name</parameter></paramdef>
<paramdef>const char *<parameter>format</parameter></paramdef> <paramdef>const char *<parameter>format</parameter></paramdef>
<paramdef>...</paramdef> <paramdef></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int sd_bus_reply_method_errorfv</funcdef>
<paramdef>sd_bus_message *<parameter>call</parameter></paramdef>
<paramdef>const char *<parameter>name</parameter></paramdef>
<paramdef>const char *<parameter>format</parameter></paramdef>
<paramdef>va_list <parameter>ap</parameter></paramdef>
</funcprototype> </funcprototype>
<funcprototype> <funcprototype>
@ -65,15 +55,7 @@
<paramdef>sd_bus_message *<parameter>call</parameter></paramdef> <paramdef>sd_bus_message *<parameter>call</parameter></paramdef>
<paramdef>int <parameter>error</parameter></paramdef> <paramdef>int <parameter>error</parameter></paramdef>
<paramdef>const char *<parameter>format</parameter></paramdef> <paramdef>const char *<parameter>format</parameter></paramdef>
<paramdef>...</paramdef> <paramdef></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int sd_bus_reply_method_errnofv</funcdef>
<paramdef>sd_bus_message *<parameter>call</parameter></paramdef>
<paramdef>int <parameter>error</parameter></paramdef>
<paramdef>const char *<parameter>format</parameter></paramdef>
<paramdef>va_list <parameter>ap</parameter></paramdef>
</funcprototype> </funcprototype>
</funcsynopsis> </funcsynopsis>
</refsynopsisdiv> </refsynopsisdiv>

View File

@ -18,7 +18,6 @@
<refnamediv> <refnamediv>
<refname>sd_bus_reply_method_return</refname> <refname>sd_bus_reply_method_return</refname>
<refname>sd_bus_reply_method_returnv</refname>
<refpurpose>Reply to a D-Bus method call</refpurpose> <refpurpose>Reply to a D-Bus method call</refpurpose>
</refnamediv> </refnamediv>
@ -33,13 +32,6 @@
<paramdef>const char *<parameter>types</parameter></paramdef> <paramdef>const char *<parameter>types</parameter></paramdef>
<paramdef>...</paramdef> <paramdef>...</paramdef>
</funcprototype> </funcprototype>
<funcprototype>
<funcdef>int sd_bus_reply_method_returnv</funcdef>
<paramdef>sd_bus_message *<parameter>call</parameter></paramdef>
<paramdef>const char *<parameter>types</parameter></paramdef>
<paramdef>va_list <parameter>ap</parameter></paramdef>
</funcprototype>
</funcsynopsis> </funcsynopsis>
</refsynopsisdiv> </refsynopsisdiv>

View File

@ -1704,16 +1704,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>MUDURL=</varname></term>
<listitem>
<para>When configured, the Manufacturer Usage Descriptions (MUD) URL will be sent to the DHCPV6 server.
Takes an URL of length up to 255 characters. A superficial verification that the string is a valid URL
will be performed. DHCPv6 clients are intended to have at most one MUD URL associated with them. See
<ulink url="https://tools.ietf.org/html/rfc8520">RFC 8520</ulink>.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>ForceDHCPv6PDOtherInformation=</varname></term> <term><varname>ForceDHCPv6PDOtherInformation=</varname></term>
<listitem> <listitem>
@ -2360,7 +2350,7 @@
<term><varname>BitRate=</varname></term> <term><varname>BitRate=</varname></term>
<listitem> <listitem>
<para>The bitrate of CAN device in bits per second. The usual SI prefixes (K, M) with the base of 1000 can <para>The bitrate of CAN device in bits per second. The usual SI prefixes (K, M) with the base of 1000 can
be used here. Takes a number in the range 1..4294967295.</para> be used here.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -2370,29 +2360,6 @@
<literal>87.5%</literal>) or permille (e.g. <literal>875‰</literal>).</para> <literal>87.5%</literal>) or permille (e.g. <literal>875‰</literal>).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>DataBitRate=</varname></term>
<term><varname>DataSamplePoint=</varname></term>
<listitem>
<para>The bitrate and sample point for the data phase, if CAN-FD is used. These settings are
analogous to the <varname>BitRate=</varname> and <varname>SamplePoint=</varname> keys.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>FDMode=</varname></term>
<listitem>
<para>Takes a boolean. When <literal>yes</literal>, CAN-FD mode is enabled for the interface.
Note, that a bitrate and optional sample point should also be set for the CAN-FD data phase using
the <varname>DataBitRate=</varname> and <varname>DataSamplePoint=</varname> keys.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>FDNonISO=</varname></term>
<listitem>
<para>Takes a boolean. When <literal>yes</literal>, non-ISO CAN-FD mode is enabled for the
interface. When unset, the kernel's default will be used.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>RestartSec=</varname></term> <term><varname>RestartSec=</varname></term>
<listitem> <listitem>

View File

@ -19,9 +19,6 @@ enable getty@.service
enable systemd-timesyncd.service enable systemd-timesyncd.service
enable systemd-networkd.service enable systemd-networkd.service
enable systemd-resolved.service enable systemd-resolved.service
enable systemd-repart.service
enable systemd-homed.service
enable systemd-userdbd.socket
disable console-getty.service disable console-getty.service
disable debug-shell.service disable debug-shell.service

View File

@ -25,7 +25,6 @@
#include "socket-util.h" #include "socket-util.h"
#include "string-table.h" #include "string-table.h"
#include "util.h" #include "util.h"
#include "web-util.h"
#define MAX_MAC_ADDR_LEN INFINIBAND_ALEN #define MAX_MAC_ADDR_LEN INFINIBAND_ALEN
@ -66,7 +65,6 @@ struct sd_dhcp6_client {
size_t req_opts_allocated; size_t req_opts_allocated;
size_t req_opts_len; size_t req_opts_len;
char *fqdn; char *fqdn;
char *mudurl;
sd_event_source *receive_message; sd_event_source *receive_message;
usec_t retransmit_time; usec_t retransmit_time;
uint8_t retransmit_count; uint8_t retransmit_count;
@ -365,17 +363,6 @@ int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client, uint16_t option)
return 0; return 0;
} }
int sd_dhcp6_client_set_request_mud_url(sd_dhcp6_client *client, char *mudurl) {
assert_return(client, -EINVAL);
assert_return(client->state == DHCP6_STATE_STOPPED, -EBUSY);
assert_return(mudurl, -EINVAL);
assert_return(strlen(mudurl) <= 255, -EINVAL);
assert_return(http_url_is_valid(mudurl), -EINVAL);
return free_and_strdup(&client->mudurl, mudurl);
}
int sd_dhcp6_client_get_prefix_delegation(sd_dhcp6_client *client, int *delegation) { int sd_dhcp6_client_get_prefix_delegation(sd_dhcp6_client *client, int *delegation) {
assert_return(client, -EINVAL); assert_return(client, -EINVAL);
assert_return(delegation, -EINVAL); assert_return(delegation, -EINVAL);
@ -497,14 +484,6 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) {
case DHCP6_STATE_INFORMATION_REQUEST: case DHCP6_STATE_INFORMATION_REQUEST:
message->type = DHCP6_INFORMATION_REQUEST; message->type = DHCP6_INFORMATION_REQUEST;
if (client->mudurl) {
r = dhcp6_option_append(&opt, &optlen,
SD_DHCP6_OPTION_MUD_URL, strlen(client->mudurl),
client->mudurl);
if (r < 0)
return r;
}
break; break;
case DHCP6_STATE_SOLICITATION: case DHCP6_STATE_SOLICITATION:
@ -528,14 +507,6 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) {
return r; return r;
} }
if (client->mudurl) {
r = dhcp6_option_append(&opt, &optlen,
SD_DHCP6_OPTION_MUD_URL, strlen(client->mudurl),
client->mudurl);
if (r < 0)
return r;
}
if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD)) { if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD)) {
r = dhcp6_option_append_pd(opt, optlen, &client->ia_pd, &client->hint_pd_prefix); r = dhcp6_option_append_pd(opt, optlen, &client->ia_pd, &client->hint_pd_prefix);
if (r < 0) if (r < 0)
@ -574,14 +545,6 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) {
return r; return r;
} }
if (client->mudurl) {
r = dhcp6_option_append(&opt, &optlen,
SD_DHCP6_OPTION_MUD_URL, strlen(client->mudurl),
client->mudurl);
if (r < 0)
return r;
}
if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD)) { if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD)) {
r = dhcp6_option_append_pd(opt, optlen, &client->lease->pd, NULL); r = dhcp6_option_append_pd(opt, optlen, &client->lease->pd, NULL);
if (r < 0) if (r < 0)
@ -608,14 +571,6 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) {
return r; return r;
} }
if (client->mudurl) {
r = dhcp6_option_append(&opt, &optlen,
SD_DHCP6_OPTION_MUD_URL, strlen(client->mudurl),
client->mudurl);
if (r < 0)
return r;
}
if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD)) { if (FLAGS_SET(client->request, DHCP6_REQUEST_IA_PD)) {
r = dhcp6_option_append_pd(opt, optlen, &client->lease->pd, NULL); r = dhcp6_option_append_pd(opt, optlen, &client->lease->pd, NULL);
if (r < 0) if (r < 0)
@ -1566,7 +1521,6 @@ static sd_dhcp6_client *dhcp6_client_free(sd_dhcp6_client *client) {
free(client->req_opts); free(client->req_opts);
free(client->fqdn); free(client->fqdn);
free(client->mudurl);
return mfree(client); return mfree(client);
} }

View File

@ -700,13 +700,6 @@ global:
LIBSYSTEMD_246 { LIBSYSTEMD_246 {
global: global:
sd_bus_call_methodv;
sd_bus_call_method_asyncv;
sd_bus_emit_signalv;
sd_bus_reply_method_errnofv;
sd_bus_reply_method_errorfv;
sd_bus_reply_method_returnv;
sd_bus_set_propertyv;
sd_path_lookup; sd_path_lookup;
sd_path_lookup_strv; sd_path_lookup_strv;
} LIBSYSTEMD_245; } LIBSYSTEMD_245;

View File

@ -10,12 +10,12 @@
#include "bus-util.h" #include "bus-util.h"
#include "string-util.h" #include "string-util.h"
_public_ int sd_bus_emit_signalv( _public_ int sd_bus_emit_signal(
sd_bus *bus, sd_bus *bus,
const char *path, const char *path,
const char *interface, const char *interface,
const char *member, const char *member,
const char *types, va_list ap) { const char *types, ...) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL; _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
int r; int r;
@ -32,7 +32,11 @@ _public_ int sd_bus_emit_signalv(
return r; return r;
if (!isempty(types)) { if (!isempty(types)) {
va_list ap;
va_start(ap, types);
r = sd_bus_message_appendv(m, types, ap); r = sd_bus_message_appendv(m, types, ap);
va_end(ap);
if (r < 0) if (r < 0)
return r; return r;
} }
@ -40,24 +44,7 @@ _public_ int sd_bus_emit_signalv(
return sd_bus_send(bus, m, NULL); return sd_bus_send(bus, m, NULL);
} }
_public_ int sd_bus_emit_signal( _public_ int sd_bus_call_method_async(
sd_bus *bus,
const char *path,
const char *interface,
const char *member,
const char *types, ...) {
va_list ap;
int r;
va_start(ap, types);
r = sd_bus_emit_signalv(bus, path, interface, member, types, ap);
va_end(ap);
return r;
}
_public_ int sd_bus_call_method_asyncv(
sd_bus *bus, sd_bus *bus,
sd_bus_slot **slot, sd_bus_slot **slot,
const char *destination, const char *destination,
@ -66,7 +53,7 @@ _public_ int sd_bus_call_method_asyncv(
const char *member, const char *member,
sd_bus_message_handler_t callback, sd_bus_message_handler_t callback,
void *userdata, void *userdata,
const char *types, va_list ap) { const char *types, ...) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL; _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
int r; int r;
@ -83,7 +70,11 @@ _public_ int sd_bus_call_method_asyncv(
return r; return r;
if (!isempty(types)) { if (!isempty(types)) {
va_list ap;
va_start(ap, types);
r = sd_bus_message_appendv(m, types, ap); r = sd_bus_message_appendv(m, types, ap);
va_end(ap);
if (r < 0) if (r < 0)
return r; return r;
} }
@ -91,28 +82,7 @@ _public_ int sd_bus_call_method_asyncv(
return sd_bus_call_async(bus, slot, m, callback, userdata, 0); return sd_bus_call_async(bus, slot, m, callback, userdata, 0);
} }
_public_ int sd_bus_call_method_async( _public_ int sd_bus_call_method(
sd_bus *bus,
sd_bus_slot **slot,
const char *destination,
const char *path,
const char *interface,
const char *member,
sd_bus_message_handler_t callback,
void *userdata,
const char *types, ...) {
va_list ap;
int r;
va_start(ap, types);
r = sd_bus_call_method_asyncv(bus, slot, destination, path, interface, member, callback, userdata, types, ap);
va_end(ap);
return r;
}
_public_ int sd_bus_call_methodv(
sd_bus *bus, sd_bus *bus,
const char *destination, const char *destination,
const char *path, const char *path,
@ -120,7 +90,7 @@ _public_ int sd_bus_call_methodv(
const char *member, const char *member,
sd_bus_error *error, sd_bus_error *error,
sd_bus_message **reply, sd_bus_message **reply,
const char *types, va_list ap) { const char *types, ...) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL; _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
int r; int r;
@ -139,7 +109,11 @@ _public_ int sd_bus_call_methodv(
goto fail; goto fail;
if (!isempty(types)) { if (!isempty(types)) {
va_list ap;
va_start(ap, types);
r = sd_bus_message_appendv(m, types, ap); r = sd_bus_message_appendv(m, types, ap);
va_end(ap);
if (r < 0) if (r < 0)
goto fail; goto fail;
} }
@ -150,29 +124,9 @@ fail:
return sd_bus_error_set_errno(error, r); return sd_bus_error_set_errno(error, r);
} }
_public_ int sd_bus_call_method( _public_ int sd_bus_reply_method_return(
sd_bus *bus,
const char *destination,
const char *path,
const char *interface,
const char *member,
sd_bus_error *error,
sd_bus_message **reply,
const char *types, ...) {
va_list ap;
int r;
va_start(ap, types);
r = sd_bus_call_methodv(bus, destination, path, interface, member, error, reply, types, ap);
va_end(ap);
return r;
}
_public_ int sd_bus_reply_method_returnv(
sd_bus_message *call, sd_bus_message *call,
const char *types, va_list ap) { const char *types, ...) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL; _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
int r; int r;
@ -194,7 +148,11 @@ _public_ int sd_bus_reply_method_returnv(
return r; return r;
if (!isempty(types)) { if (!isempty(types)) {
va_list ap;
va_start(ap, types);
r = sd_bus_message_appendv(m, types, ap); r = sd_bus_message_appendv(m, types, ap);
va_end(ap);
if (r < 0) if (r < 0)
return r; return r;
} }
@ -202,20 +160,6 @@ _public_ int sd_bus_reply_method_returnv(
return sd_bus_send(call->bus, m, NULL); return sd_bus_send(call->bus, m, NULL);
} }
_public_ int sd_bus_reply_method_return(
sd_bus_message *call,
const char *types, ...) {
va_list ap;
int r;
va_start(ap, types);
r = sd_bus_reply_method_returnv(call, types, ap);
va_end(ap);
return r;
}
_public_ int sd_bus_reply_method_error( _public_ int sd_bus_reply_method_error(
sd_bus_message *call, sd_bus_message *call,
const sd_bus_error *e) { const sd_bus_error *e) {
@ -243,13 +187,14 @@ _public_ int sd_bus_reply_method_error(
return sd_bus_send(call->bus, m, NULL); return sd_bus_send(call->bus, m, NULL);
} }
_public_ int sd_bus_reply_method_errorfv( _public_ int sd_bus_reply_method_errorf(
sd_bus_message *call, sd_bus_message *call,
const char *name, const char *name,
const char *format, const char *format,
va_list ap) { ...) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
va_list ap;
assert_return(call, -EINVAL); assert_return(call, -EINVAL);
assert_return(call->sealed, -EPERM); assert_return(call->sealed, -EPERM);
@ -263,25 +208,11 @@ _public_ int sd_bus_reply_method_errorfv(
if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
return 0; return 0;
bus_error_setfv(&error, name, format, ap);
return sd_bus_reply_method_error(call, &error);
}
_public_ int sd_bus_reply_method_errorf(
sd_bus_message *call,
const char *name,
const char *format,
...) {
va_list ap;
int r;
va_start(ap, format); va_start(ap, format);
r = sd_bus_reply_method_errorfv(call, name, format, ap); bus_error_setfv(&error, name, format, ap);
va_end(ap); va_end(ap);
return r; return sd_bus_reply_method_error(call, &error);
} }
_public_ int sd_bus_reply_method_errno( _public_ int sd_bus_reply_method_errno(
@ -311,13 +242,14 @@ _public_ int sd_bus_reply_method_errno(
return sd_bus_reply_method_error(call, &berror); return sd_bus_reply_method_error(call, &berror);
} }
_public_ int sd_bus_reply_method_errnofv( _public_ int sd_bus_reply_method_errnof(
sd_bus_message *call, sd_bus_message *call,
int error, int error,
const char *format, const char *format,
va_list ap) { ...) {
_cleanup_(sd_bus_error_free) sd_bus_error berror = SD_BUS_ERROR_NULL; _cleanup_(sd_bus_error_free) sd_bus_error berror = SD_BUS_ERROR_NULL;
va_list ap;
assert_return(call, -EINVAL); assert_return(call, -EINVAL);
assert_return(call->sealed, -EPERM); assert_return(call->sealed, -EPERM);
@ -331,25 +263,11 @@ _public_ int sd_bus_reply_method_errnofv(
if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
return 0; return 0;
sd_bus_error_set_errnofv(&berror, error, format, ap);
return sd_bus_reply_method_error(call, &berror);
}
_public_ int sd_bus_reply_method_errnof(
sd_bus_message *call,
int error,
const char *format,
...) {
va_list ap;
int r;
va_start(ap, format); va_start(ap, format);
r = sd_bus_reply_method_errnofv(call, error, format, ap); sd_bus_error_set_errnofv(&berror, error, format, ap);
va_end(ap); va_end(ap);
return r; return sd_bus_reply_method_error(call, &berror);
} }
_public_ int sd_bus_get_property( _public_ int sd_bus_get_property(
@ -534,16 +452,17 @@ fail:
return sd_bus_error_set_errno(error, r); return sd_bus_error_set_errno(error, r);
} }
_public_ int sd_bus_set_propertyv( _public_ int sd_bus_set_property(
sd_bus *bus, sd_bus *bus,
const char *destination, const char *destination,
const char *path, const char *path,
const char *interface, const char *interface,
const char *member, const char *member,
sd_bus_error *error, sd_bus_error *error,
const char *type, va_list ap) { const char *type, ...) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL; _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
va_list ap;
int r; int r;
bus_assert_return(bus, -EINVAL, error); bus_assert_return(bus, -EINVAL, error);
@ -570,7 +489,9 @@ _public_ int sd_bus_set_propertyv(
if (r < 0) if (r < 0)
goto fail; goto fail;
va_start(ap, type);
r = sd_bus_message_appendv(m, type, ap); r = sd_bus_message_appendv(m, type, ap);
va_end(ap);
if (r < 0) if (r < 0)
goto fail; goto fail;
@ -584,25 +505,6 @@ fail:
return sd_bus_error_set_errno(error, r); return sd_bus_error_set_errno(error, r);
} }
_public_ int sd_bus_set_property(
sd_bus *bus,
const char *destination,
const char *path,
const char *interface,
const char *member,
sd_bus_error *error,
const char *type, ...) {
va_list ap;
int r;
va_start(ap, type);
r = sd_bus_set_propertyv(bus, destination, path, interface, member, error, type, ap);
va_end(ap);
return r;
}
_public_ int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_creds **creds) { _public_ int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_creds **creds) {
sd_bus_creds *c; sd_bus_creds *c;

View File

@ -2184,69 +2184,6 @@ static int link_delete_send_message(sd_netlink *rtnl, int index) {
return 0; return 0;
} }
static int link_up_down_send_message(sd_netlink *rtnl, char *command, int index) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
int r;
assert(rtnl);
r = sd_rtnl_message_new_link(rtnl, &req, RTM_SETLINK, index);
if (r < 0)
return rtnl_log_create_error(r);
if (streq(command, "up"))
r = sd_rtnl_message_link_set_flags(req, IFF_UP, IFF_UP);
else
r = sd_rtnl_message_link_set_flags(req, 0, IFF_UP);
if (r < 0)
return log_error_errno(r, "Could not set link flags: %m");
r = sd_netlink_call(rtnl, req, 0, NULL);
if (r < 0)
return r;
return 0;
}
static int link_up_down(int argc, char *argv[], void *userdata) {
_cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL;
_cleanup_set_free_ Set *indexes = NULL;
int index, r, i;
Iterator j;
void *p;
r = sd_netlink_open(&rtnl);
if (r < 0)
return log_error_errno(r, "Failed to connect to netlink: %m");
indexes = set_new(NULL);
if (!indexes)
return log_oom();
for (i = 1; i < argc; i++) {
index = resolve_interface_or_warn(&rtnl, argv[i]);
if (index < 0)
return index;
r = set_put(indexes, INT_TO_PTR(index));
if (r < 0)
return log_oom();
}
SET_FOREACH(p, indexes, j) {
index = PTR_TO_INT(p);
r = link_up_down_send_message(rtnl, argv[0], index);
if (r < 0) {
char ifname[IF_NAMESIZE + 1];
return log_error_errno(r, "Failed to %s interface %s: %m",
argv[1], format_ifname_full(index, ifname, FORMAT_IFNAME_IFINDEX));
}
}
return r;
}
static int link_delete(int argc, char *argv[], void *userdata) { static int link_delete(int argc, char *argv[], void *userdata) {
_cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL; _cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL;
_cleanup_set_free_ Set *indexes = NULL; _cleanup_set_free_ Set *indexes = NULL;
@ -2455,8 +2392,6 @@ static int help(void) {
" lldp [PATTERN...] Show LLDP neighbors\n" " lldp [PATTERN...] Show LLDP neighbors\n"
" label Show current address label entries in the kernel\n" " label Show current address label entries in the kernel\n"
" delete DEVICES... Delete virtual netdevs\n" " delete DEVICES... Delete virtual netdevs\n"
" up DEVICES... Bring devices up\n"
" down DEVICES... Bring devices down\n"
" renew DEVICES... Renew dynamic configurations\n" " renew DEVICES... Renew dynamic configurations\n"
" forcerenew DEVICES... Trigger DHCP reconfiguration of all connected clients\n" " forcerenew DEVICES... Trigger DHCP reconfiguration of all connected clients\n"
" reconfigure DEVICES... Reconfigure interfaces\n" " reconfigure DEVICES... Reconfigure interfaces\n"
@ -2559,8 +2494,6 @@ static int networkctl_main(int argc, char *argv[]) {
{ "lldp", VERB_ANY, VERB_ANY, 0, link_lldp_status }, { "lldp", VERB_ANY, VERB_ANY, 0, link_lldp_status },
{ "label", VERB_ANY, VERB_ANY, 0, list_address_labels }, { "label", VERB_ANY, VERB_ANY, 0, list_address_labels },
{ "delete", 2, VERB_ANY, 0, link_delete }, { "delete", 2, VERB_ANY, 0, link_delete },
{ "up", 2, VERB_ANY, 0, link_up_down },
{ "down", 2, VERB_ANY, 0, link_up_down },
{ "renew", 2, VERB_ANY, 0, link_renew }, { "renew", 2, VERB_ANY, 0, link_renew },
{ "forcerenew", 2, VERB_ANY, 0, link_force_renew }, { "forcerenew", 2, VERB_ANY, 0, link_force_renew },
{ "reconfigure", 2, VERB_ANY, 0, verb_reconfigure }, { "reconfigure", 2, VERB_ANY, 0, verb_reconfigure },

View File

@ -7,51 +7,10 @@
#include "networkd-can.h" #include "networkd-can.h"
#include "networkd-link.h" #include "networkd-link.h"
#include "networkd-manager.h" #include "networkd-manager.h"
#include "parse-util.h"
#include "string-util.h" #include "string-util.h"
#define CAN_TERMINATION_OHM_VALUE 120 #define CAN_TERMINATION_OHM_VALUE 120
int config_parse_can_bitrate(
const char* unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
uint32_t *br = data;
uint64_t sz;
int r;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
r = parse_size(rvalue, 1000, &sz);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r,
"Failed to parse can bitrate '%s', ignoring: %m", rvalue);
return 0;
}
/* Linux uses __u32 for bitrates, so the value should not exceed that. */
if (sz <= 0 || sz > UINT32_MAX) {
log_syntax(unit, LOG_ERR, filename, line, 0,
"Bit rate out of permitted range 1...4294967295");
return 0;
}
*br = (uint32_t) sz;
return 0;
}
static int link_up_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) { static int link_up_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
int r; int r;
@ -144,6 +103,11 @@ static int link_set_can(Link *link) {
.sample_point = link->network->can_sample_point, .sample_point = link->network->can_sample_point,
}; };
if (link->network->can_bitrate > UINT32_MAX) {
log_link_error(link, "bitrate (%" PRIu64 ") too big.", link->network->can_bitrate);
return -ERANGE;
}
log_link_debug(link, "Setting bitrate = %d bit/s", bt.bitrate); log_link_debug(link, "Setting bitrate = %d bit/s", bt.bitrate);
if (link->network->can_sample_point > 0) if (link->network->can_sample_point > 0)
log_link_debug(link, "Setting sample point = %d.%d%%", bt.sample_point / 10, bt.sample_point % 10); log_link_debug(link, "Setting sample point = %d.%d%%", bt.sample_point / 10, bt.sample_point % 10);
@ -155,35 +119,6 @@ static int link_set_can(Link *link) {
return log_link_error_errno(link, r, "Could not append IFLA_CAN_BITTIMING attribute: %m"); return log_link_error_errno(link, r, "Could not append IFLA_CAN_BITTIMING attribute: %m");
} }
if (link->network->can_data_bitrate > 0 || link->network->can_data_sample_point > 0) {
struct can_bittiming bt = {
.bitrate = link->network->can_data_bitrate,
.sample_point = link->network->can_data_sample_point,
};
log_link_debug(link, "Setting data bitrate = %d bit/s", bt.bitrate);
if (link->network->can_data_sample_point > 0)
log_link_debug(link, "Setting data sample point = %d.%d%%", bt.sample_point / 10, bt.sample_point % 10);
else
log_link_debug(link, "Using default data sample point");
r = sd_netlink_message_append_data(m, IFLA_CAN_DATA_BITTIMING, &bt, sizeof(bt));
if (r < 0)
return log_link_error_errno(link, r, "Could not append IFLA_CAN_DATA_BITTIMING attribute: %m");
}
if (link->network->can_fd_mode >= 0) {
cm.mask |= CAN_CTRLMODE_FD;
SET_FLAG(cm.flags, CAN_CTRLMODE_FD, link->network->can_fd_mode > 0);
log_link_debug(link, "%sabling FD mode", link->network->can_fd_mode > 0 ? "En" : "Dis");
}
if (link->network->can_non_iso >= 0) {
cm.mask |= CAN_CTRLMODE_FD_NON_ISO;
SET_FLAG(cm.flags, CAN_CTRLMODE_FD_NON_ISO, link->network->can_non_iso > 0);
log_link_debug(link, "%sabling FD non-ISO mode", link->network->can_non_iso > 0 ? "En" : "Dis");
}
if (link->network->can_restart_us > 0) { if (link->network->can_restart_us > 0) {
char time_string[FORMAT_TIMESPAN_MAX]; char time_string[FORMAT_TIMESPAN_MAX];
uint64_t restart_ms; uint64_t restart_ms;

View File

@ -1,10 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */ /* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once #pragma once
#include "conf-parser.h"
typedef struct Link Link; typedef struct Link Link;
int link_configure_can(Link *link); int link_configure_can(Link *link);
CONFIG_PARSER_PROTOTYPE(config_parse_can_bitrate);

View File

@ -8,7 +8,6 @@
#include "parse-util.h" #include "parse-util.h"
#include "string-table.h" #include "string-table.h"
#include "strv.h" #include "strv.h"
#include "web-util.h"
int config_parse_dhcp( int config_parse_dhcp(
const char* unit, const char* unit,
@ -266,48 +265,6 @@ int config_parse_dhcp6_pd_hint(
return 0; return 0;
} }
int config_parse_dhcp6_mud_url(
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
_cleanup_free_ char *unescaped = NULL;
Network *network = data;
int r;
assert(filename);
assert(lvalue);
assert(rvalue);
if (isempty(rvalue)) {
network->dhcp6_mudurl = mfree(network->dhcp6_mudurl);
return 0;
}
r = cunescape(rvalue, 0, &unescaped);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r,
"Failed to Failed to unescape MUD URL, ignoring: %s", rvalue);
return 0;
}
if (!http_url_is_valid(unescaped) || strlen(unescaped) > 255) {
log_syntax(unit, LOG_ERR, filename, line, 0,
"Failed to parse MUD URL '%s', ignoring: %m", rvalue);
return 0;
}
return free_and_replace(network->dhcp6_mudurl, unescaped);
}
int config_parse_dhcp_send_option( int config_parse_dhcp_send_option(
const char *unit, const char *unit,
const char *filename, const char *filename,

View File

@ -48,5 +48,4 @@ CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_use_sip);
CONFIG_PARSER_PROTOTYPE(config_parse_iaid); CONFIG_PARSER_PROTOTYPE(config_parse_iaid);
CONFIG_PARSER_PROTOTYPE(config_parse_section_route_table); CONFIG_PARSER_PROTOTYPE(config_parse_section_route_table);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_pd_hint); CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_pd_hint);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_mud_url);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_send_option); CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_send_option);

View File

@ -676,12 +676,6 @@ int dhcp6_configure(Link *link) {
return log_link_error_errno(link, r, "DHCP6 CLIENT: Failed to set request flag for rapid commit: %m"); return log_link_error_errno(link, r, "DHCP6 CLIENT: Failed to set request flag for rapid commit: %m");
} }
if (link->network->dhcp6_mudurl) {
r = sd_dhcp6_client_set_request_mud_url(client, link->network->dhcp6_mudurl);
if (r < 0)
return log_link_error_errno(link, r, "DHCP6 CLIENT: Failed to set MUD URL: %m");
}
r = sd_dhcp6_client_set_callback(client, dhcp6_handler, link); r = sd_dhcp6_client_set_callback(client, dhcp6_handler, link);
if (r < 0) if (r < 0)
return log_link_error_errno(link, r, "DHCP6 CLIENT: Failed to set callback: %m"); return log_link_error_errno(link, r, "DHCP6 CLIENT: Failed to set callback: %m");

View File

@ -6,7 +6,6 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
#include "conf-parser.h" #include "conf-parser.h"
#include "netem.h" #include "netem.h"
#include "network-internal.h" #include "network-internal.h"
#include "networkd-can.h"
#include "networkd-conf.h" #include "networkd-conf.h"
#include "networkd-dhcp-common.h" #include "networkd-dhcp-common.h"
#include "networkd-dhcp-server.h" #include "networkd-dhcp-server.h"
@ -191,7 +190,6 @@ DHCPv4.RouteMTUBytes, config_parse_mtu,
DHCPv6.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp6_use_dns) DHCPv6.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp6_use_dns)
DHCPv6.UseNTP, config_parse_bool, 0, offsetof(Network, dhcp6_use_ntp) DHCPv6.UseNTP, config_parse_bool, 0, offsetof(Network, dhcp6_use_ntp)
DHCPv6.RapidCommit, config_parse_bool, 0, offsetof(Network, rapid_commit) DHCPv6.RapidCommit, config_parse_bool, 0, offsetof(Network, rapid_commit)
DHCPv6.MUDURL, config_parse_dhcp6_mud_url, 0, 0
DHCPv6.ForceDHCPv6PDOtherInformation, config_parse_bool, 0, offsetof(Network, dhcp6_force_pd_other_information) DHCPv6.ForceDHCPv6PDOtherInformation, config_parse_bool, 0, offsetof(Network, dhcp6_force_pd_other_information)
DHCPv6.PrefixDelegationHint, config_parse_dhcp6_pd_hint, 0, 0 DHCPv6.PrefixDelegationHint, config_parse_dhcp6_pd_hint, 0, 0
DHCPv6.WithoutRA, config_parse_bool, 0, offsetof(Network, dhcp6_without_ra) DHCPv6.WithoutRA, config_parse_bool, 0, offsetof(Network, dhcp6_without_ra)
@ -259,12 +257,8 @@ IPv6Prefix.PreferredLifetimeSec, config_parse_prefix_lifetime,
IPv6Prefix.Assign, config_parse_prefix_assign, 0, 0 IPv6Prefix.Assign, config_parse_prefix_assign, 0, 0
IPv6RoutePrefix.Route, config_parse_route_prefix, 0, 0 IPv6RoutePrefix.Route, config_parse_route_prefix, 0, 0
IPv6RoutePrefix.LifetimeSec, config_parse_route_prefix_lifetime, 0, 0 IPv6RoutePrefix.LifetimeSec, config_parse_route_prefix_lifetime, 0, 0
CAN.BitRate, config_parse_can_bitrate, 0, offsetof(Network, can_bitrate) CAN.BitRate, config_parse_si_uint64, 0, offsetof(Network, can_bitrate)
CAN.SamplePoint, config_parse_permille, 0, offsetof(Network, can_sample_point) CAN.SamplePoint, config_parse_permille, 0, offsetof(Network, can_sample_point)
CAN.DataBitRate, config_parse_can_bitrate, 0, offsetof(Network, can_data_bitrate)
CAN.DataSamplePoint, config_parse_permille, 0, offsetof(Network, can_data_sample_point)
CAN.FDMode, config_parse_tristate, 0, offsetof(Network, can_fd_mode)
CAN.FDNonISO, config_parse_tristate, 0, offsetof(Network, can_non_iso)
CAN.RestartSec, config_parse_sec, 0, offsetof(Network, can_restart_us) CAN.RestartSec, config_parse_sec, 0, offsetof(Network, can_restart_us)
CAN.TripleSampling, config_parse_tristate, 0, offsetof(Network, can_triple_sampling) CAN.TripleSampling, config_parse_tristate, 0, offsetof(Network, can_triple_sampling)
CAN.Termination, config_parse_tristate, 0, offsetof(Network, can_termination) CAN.Termination, config_parse_tristate, 0, offsetof(Network, can_termination)

View File

@ -646,7 +646,6 @@ static Network *network_free(Network *network) {
set_free(network->dhcp_black_listed_ip); set_free(network->dhcp_black_listed_ip);
set_free(network->dhcp_request_options); set_free(network->dhcp_request_options);
free(network->mac); free(network->mac);
free(network->dhcp6_mudurl);
if (network->dhcp_acd) if (network->dhcp_acd)
sd_ipv4acd_unref(network->dhcp_acd); sd_ipv4acd_unref(network->dhcp_acd);

View File

@ -131,7 +131,6 @@ struct Network {
bool dhcp6_use_ntp; bool dhcp6_use_ntp;
bool dhcp6_without_ra; bool dhcp6_without_ra;
uint8_t dhcp6_pd_length; uint8_t dhcp6_pd_length;
char *dhcp6_mudurl;
struct in6_addr dhcp6_pd_address; struct in6_addr dhcp6_pd_address;
/* DHCP Server Support */ /* DHCP Server Support */
@ -206,16 +205,12 @@ struct Network {
uint32_t br_untagged_bitmap[BRIDGE_VLAN_BITMAP_LEN]; uint32_t br_untagged_bitmap[BRIDGE_VLAN_BITMAP_LEN];
/* CAN support */ /* CAN support */
uint32_t can_bitrate; uint64_t can_bitrate;
unsigned can_sample_point; unsigned can_sample_point;
uint32_t can_data_bitrate;
unsigned can_data_sample_point;
usec_t can_restart_us; usec_t can_restart_us;
int can_triple_sampling; int can_triple_sampling;
int can_termination; int can_termination;
int can_listen_only; int can_listen_only;
int can_fd_mode;
int can_non_iso;
AddressFamily ip_forward; AddressFamily ip_forward;
bool ip_masquerade; bool ip_masquerade;

View File

@ -352,27 +352,20 @@ int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machin
/* Convenience calls */ /* Convenience calls */
int sd_bus_call_methodv(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *types, va_list ap);
int sd_bus_call_method(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *types, ...); int sd_bus_call_method(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *types, ...);
int sd_bus_call_method_asyncv(sd_bus *bus, sd_bus_slot **slot, const char *destination, const char *path, const char *interface, const char *member, sd_bus_message_handler_t callback, void *userdata, const char *types, va_list ap);
int sd_bus_call_method_async(sd_bus *bus, sd_bus_slot **slot, const char *destination, const char *path, const char *interface, const char *member, sd_bus_message_handler_t callback, void *userdata, const char *types, ...); int sd_bus_call_method_async(sd_bus *bus, sd_bus_slot **slot, const char *destination, const char *path, const char *interface, const char *member, sd_bus_message_handler_t callback, void *userdata, const char *types, ...);
int sd_bus_get_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *type); int sd_bus_get_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *type);
int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char type, void *ret_ptr); int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char type, void *ret_ptr);
int sd_bus_get_property_string(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char **ret); /* free the result! */ int sd_bus_get_property_string(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char **ret); /* free the result! */
int sd_bus_get_property_strv(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char ***ret); /* free the result! */ int sd_bus_get_property_strv(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char ***ret); /* free the result! */
int sd_bus_set_propertyv(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, const char *type, va_list ap);
int sd_bus_set_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, const char *type, ...); int sd_bus_set_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, const char *type, ...);
int sd_bus_reply_method_returnv(sd_bus_message *call, const char *types, va_list ap);
int sd_bus_reply_method_return(sd_bus_message *call, const char *types, ...); int sd_bus_reply_method_return(sd_bus_message *call, const char *types, ...);
int sd_bus_reply_method_error(sd_bus_message *call, const sd_bus_error *e); int sd_bus_reply_method_error(sd_bus_message *call, const sd_bus_error *e);
int sd_bus_reply_method_errorfv(sd_bus_message *call, const char *name, const char *format, va_list ap) _sd_printf_(3, 0);
int sd_bus_reply_method_errorf(sd_bus_message *call, const char *name, const char *format, ...) _sd_printf_(3, 4); int sd_bus_reply_method_errorf(sd_bus_message *call, const char *name, const char *format, ...) _sd_printf_(3, 4);
int sd_bus_reply_method_errno(sd_bus_message *call, int error, const sd_bus_error *e); int sd_bus_reply_method_errno(sd_bus_message *call, int error, const sd_bus_error *e);
int sd_bus_reply_method_errnofv(sd_bus_message *call, int error, const char *format, va_list ap) _sd_printf_(3, 0);
int sd_bus_reply_method_errnof(sd_bus_message *call, int error, const char *format, ...) _sd_printf_(3, 4); int sd_bus_reply_method_errnof(sd_bus_message *call, int error, const char *format, ...) _sd_printf_(3, 4);
int sd_bus_emit_signalv(sd_bus *bus, const char *path, const char *interface, const char *member, const char *types, va_list ap);
int sd_bus_emit_signal(sd_bus *bus, const char *path, const char *interface, const char *member, const char *types, ...); int sd_bus_emit_signal(sd_bus *bus, const char *path, const char *interface, const char *member, const char *types, ...);
int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, const char *interface, char **names); int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, const char *interface, char **names);

View File

@ -73,7 +73,6 @@ enum {
SD_DHCP6_OPTION_FQDN = 39, /* RFC 4704 */ SD_DHCP6_OPTION_FQDN = 39, /* RFC 4704 */
SD_DHCP6_OPTION_NTP_SERVER = 56, /* RFC 5908 */ SD_DHCP6_OPTION_NTP_SERVER = 56, /* RFC 5908 */
SD_DHCP6_OPTION_MUD_URL = 112, /* RFC 8250 */
/* option codes 89-142 are unassigned */ /* option codes 89-142 are unassigned */
/* option codes 144-65535 are unassigned */ /* option codes 144-65535 are unassigned */
@ -121,9 +120,6 @@ int sd_dhcp6_client_get_information_request(
int sd_dhcp6_client_set_request_option( int sd_dhcp6_client_set_request_option(
sd_dhcp6_client *client, sd_dhcp6_client *client,
uint16_t option); uint16_t option);
int sd_dhcp6_client_set_request_mud_url(
sd_dhcp6_client *client,
char *mudurl);
int sd_dhcp6_client_set_prefix_delegation_hint( int sd_dhcp6_client_set_prefix_delegation_hint(
sd_dhcp6_client *client, sd_dhcp6_client *client,
uint8_t prefixlen, uint8_t prefixlen,

View File

@ -498,7 +498,7 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
if (config->alternative_names_policy) if (config->alternative_names_policy)
for (NamePolicy *p = config->alternative_names_policy; *p != _NAMEPOLICY_INVALID; p++) { for (NamePolicy *p = config->alternative_names_policy; *p != _NAMEPOLICY_INVALID; p++) {
const char *n = NULL; const char *n;
switch (*p) { switch (*p) {
case NAMEPOLICY_DATABASE: case NAMEPOLICY_DATABASE:

View File

@ -111,7 +111,6 @@ RapidCommit=
ForceDHCPv6PDOtherInformation= ForceDHCPv6PDOtherInformation=
PrefixDelegationHint= PrefixDelegationHint=
WithoutRA= WithoutRA=
MUDURL=
[Route] [Route]
Destination= Destination=
Protocol= Protocol=
@ -202,10 +201,6 @@ PVID=
[CAN] [CAN]
SamplePoint= SamplePoint=
BitRate= BitRate=
DataSamplePoint=
DataBitRate=
FDMode=
FDNonISO=
RestartSec= RestartSec=
TripleSampling= TripleSampling=
Termination= Termination=

View File

@ -1964,7 +1964,7 @@ test_setup() {
if [ ${TEST_REQUIRE_INSTALL_TESTS} -ne 0 ] && \ if [ ${TEST_REQUIRE_INSTALL_TESTS} -ne 0 ] && \
type -P meson >/dev/null && \ type -P meson >/dev/null && \
[[ "$(meson configure $BUILD_DIR | grep install-tests | awk '{ print $2 }')" != "true" ]]; then [[ "$(meson configure $BUILD_DIR | grep install-tests | awk '{ print $2 }')" != "true" ]]; then
dfatal "$BUILD_DIR needs to be built with -Dinstall-tests=true" dfatal "Needs to be built with -Dinstall-tests=true"
exit 1 exit 1
fi fi

View File

@ -1,9 +1,7 @@
[Unit] [Unit]
Description=TEST-46-HOMED Description=TEST-46-HOMED
Wants=getty-pre.target
Before=getty-pre.target Before=getty-pre.target
Wants=systemd-homed.service Wants=getty-pre.target
After=systemd-homed.service
[Service] [Service]
ExecStartPre=rm -f /failed /testok ExecStartPre=rm -f /failed /testok

View File

@ -139,7 +139,8 @@ units = [
'sysinit.target.wants/'], 'sysinit.target.wants/'],
['systemd-udevd-kernel.socket', '', ['systemd-udevd-kernel.socket', '',
'sockets.target.wants/'], 'sockets.target.wants/'],
['systemd-userdbd.socket', 'ENABLE_USERDB'], ['systemd-userdbd.socket', 'ENABLE_USERDB',
'sockets.target.wants/'],
['time-set.target', ''], ['time-set.target', ''],
['time-sync.target', ''], ['time-sync.target', ''],
['timers.target', ''], ['timers.target', ''],
@ -200,7 +201,8 @@ in_units = [
['systemd-portabled.service', 'ENABLE_PORTABLED', ['systemd-portabled.service', 'ENABLE_PORTABLED',
'dbus-org.freedesktop.portable1.service'], 'dbus-org.freedesktop.portable1.service'],
['systemd-userdbd.service', 'ENABLE_USERDB'], ['systemd-userdbd.service', 'ENABLE_USERDB'],
['systemd-homed.service', 'ENABLE_HOMED'], ['systemd-homed.service', 'ENABLE_HOMED',
'multi-user.target.wants/ dbus-org.freedesktop.home1.service'],
['systemd-quotacheck.service', 'ENABLE_QUOTACHECK'], ['systemd-quotacheck.service', 'ENABLE_QUOTACHECK'],
['systemd-random-seed.service', 'ENABLE_RANDOMSEED', ['systemd-random-seed.service', 'ENABLE_RANDOMSEED',
'sysinit.target.wants/'], 'sysinit.target.wants/'],
@ -226,7 +228,8 @@ in_units = [
'multi-user.target.wants/'], 'multi-user.target.wants/'],
['systemd-vconsole-setup.service', 'ENABLE_VCONSOLE'], ['systemd-vconsole-setup.service', 'ENABLE_VCONSOLE'],
['systemd-volatile-root.service', ''], ['systemd-volatile-root.service', ''],
['systemd-repart.service', 'ENABLE_REPART'], ['systemd-repart.service', 'ENABLE_REPART',
'sysinit.target.wants/ initrd-root-fs.target.wants/'],
['user-runtime-dir@.service', ''], ['user-runtime-dir@.service', ''],
['user@.service', ''], ['user@.service', ''],
] ]

View File

@ -34,7 +34,3 @@ SystemCallArchitectures=native
SystemCallErrorNumber=EPERM SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service @mount SystemCallFilter=@system-service @mount
@SERVICE_WATCHDOG@ @SERVICE_WATCHDOG@
[Install]
WantedBy=multi-user.target
Alias=dbus-org.freedesktop.home1.service

View File

@ -21,9 +21,5 @@ Type=oneshot
RemainAfterExit=yes RemainAfterExit=yes
ExecStart=@rootbindir@/systemd-repart --dry-run=no ExecStart=@rootbindir@/systemd-repart --dry-run=no
# The tool returns 77 if there's no existing GPT partition table # The tool returns 77 if there's no GPT partition table pre-existing
SuccessExitStatus=77 SuccessExitStatus=77
[Install]
WantedBy=sysinit.target
WantedBy=initrd-root-fs.target

View File

@ -39,6 +39,3 @@ SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service SystemCallFilter=@system-service
Type=notify Type=notify
@SERVICE_WATCHDOG@ @SERVICE_WATCHDOG@
[Install]
Also=systemd-userdbd.socket

View File

@ -17,6 +17,3 @@ Before=sockets.target
ListenStream=/run/systemd/userdb/io.systemd.Multiplexer ListenStream=/run/systemd/userdb/io.systemd.Multiplexer
Symlinks=/run/systemd/userdb/io.systemd.NameServiceSwitch Symlinks=/run/systemd/userdb/io.systemd.NameServiceSwitch
SocketMode=0666 SocketMode=0666
[Install]
WantedBy=sockets.target