Merge ~enr0n/ubuntu/+source/systemd:ubuntu-jammy-sru into ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-jammy

Proposed by Nick Rosbrook
Status: Merged
Merge reported by: Lukas Märdian
Merged at revision: 9e36277515a58976eeb46cf40b4f5b1816bc62c2
Proposed branch: ~enr0n/ubuntu/+source/systemd:ubuntu-jammy-sru
Merge into: ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-jammy
Diff against target: 506 lines (+442/-0)
10 files modified
debian/changelog (+22/-0)
debian/patches/lp2000880-network-create-stacked-netdevs-after-the-underlying-link-.patch (+33/-0)
debian/patches/lp2002445/sd-netlink-add-a-test-for-rtnl_set_link_name.patch (+81/-0)
debian/patches/lp2002445/sd-netlink-do-not-swap-old-name-and-alternative-name.patch (+54/-0)
debian/patches/lp2002445/sd-netlink-restore-altname-on-error-in-rtnl_set_link_name.patch (+64/-0)
debian/patches/lp2002445/udev-attempt-device-rename-even-if-interface-is-up.patch (+63/-0)
debian/patches/lp2002445/udev-net-allow-new-link-name-as-an-altname-before-renamin.patch (+36/-0)
debian/patches/lp2004478-network-dhcp4-accept-local-subnet-routes-from-DHCP.patch (+54/-0)
debian/patches/lp2009502-Enable-dev-sgx_vepc-access-for-the-group-sgx.patch (+27/-0)
debian/patches/series (+8/-0)
Reviewer Review Type Date Requested Status
Lukas Märdian Approve
Review via email: mp+438247@code.launchpad.net
To post a comment you must log in.
434480a... by Nick Rosbrook

Enable /dev/sgx_vepc access for the group 'sgx' (LP: #2009502)

2d20df8... by Nick Rosbrook

Update changelog

9e36277... by Nick Rosbrook

Release systemd 249.11-0ubuntu3.7

Revision history for this message
Lukas Märdian (slyon) wrote :

Thank you for providing a test build and autopkgtest results and for confirming that the amd64 test passes for you locally.

This LGTM (thanks for making use of the "Gbp-Pq: Topic ..." header)!

Are the fixes/SRU for bug #2004478 & bug #2002445 for Kinetic and/or Lunar already in the pipeline? Those will block this SRU migrating to jammy-updates, but I think we can still go ahead and get it into -proposed for verification already. Generally, I feel it is the better approach to do SRUs from newer to older (Lunar -> ... -> Focal), but I know in this case we had some urgency to get the Focal SRU out and tested, so we'll work around this situation a bit.

I've rebased your work on the (very) recent security update "249.11-0ubuntu3.7" and picked the next free revision for your upload: "249.11-0ubuntu3.8".

review: Approve
Revision history for this message
Lukas Märdian (slyon) wrote :
Revision history for this message
Nick Rosbrook (enr0n) wrote :

Thanks, Lukas!

In this case it was more convenient for patching and testing to go older->newer. I did not necessarily require that things be uploaded in that order, but it is convenient since Focal is the most urgent, and the releases are being prepped already.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 4ef5f38..7c17eb9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,25 @@
1systemd (249.11-0ubuntu3.7) jammy; urgency=medium
2
3 * network/dhcp4: accept local subnet routes from DHCP (LP: #2004478)
4 File: debian/patches/lp2004478-network-dhcp4-accept-local-subnet-routes-from-DHCP.patch
5 https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=96928d5f45ebbfe682b47e842d63506fa0ac9583
6 * udev: avoid NIC renaming race with kernel (LP: #2002445)
7 Files:
8 - debian/patches/lp2002445/sd-netlink-add-a-test-for-rtnl_set_link_name.patch
9 - debian/patches/lp2002445/sd-netlink-do-not-swap-old-name-and-alternative-name.patch
10 - debian/patches/lp2002445/sd-netlink-restore-altname-on-error-in-rtnl_set_link_name.patch
11 - debian/patches/lp2002445/udev-attempt-device-rename-even-if-interface-is-up.patch
12 - debian/patches/lp2002445/udev-net-allow-new-link-name-as-an-altname-before-renamin.patch
13 https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=20dc4d51a340669c26c446c23b5a84516e82ea74
14 * network: create stacked netdevs after the underlying link is (LP: #2000880)
15 File: debian/patches/lp2000880-network-create-stacked-netdevs-after-the-underlying-link-.patch
16 https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=ab620e709f3f62eda86af26fd66c00d6e5165a25
17 * Enable /dev/sgx_vepc access for the group 'sgx' (LP: #2009502)
18 File: debian/patches/lp2009502-Enable-dev-sgx_vepc-access-for-the-group-sgx.patch
19 https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=434480ae4059a16ccbde9613be0c26ff1983cc3a
20
21 -- Nick Rosbrook <nick.rosbrook@canonical.com> Mon, 06 Mar 2023 14:51:06 -0500
22
1systemd (249.11-0ubuntu3.6) jammy; urgency=medium23systemd (249.11-0ubuntu3.6) jammy; urgency=medium
224
3 * Deny-list TEST-58-REPART on ppc64el (LP: #1988994)25 * Deny-list TEST-58-REPART on ppc64el (LP: #1988994)
diff --git a/debian/patches/lp2000880-network-create-stacked-netdevs-after-the-underlying-link-.patch b/debian/patches/lp2000880-network-create-stacked-netdevs-after-the-underlying-link-.patch
4new file mode 10064426new file mode 100644
index 0000000..7ff29a1
--- /dev/null
+++ b/debian/patches/lp2000880-network-create-stacked-netdevs-after-the-underlying-link-.patch
@@ -0,0 +1,33 @@
1From: Yu Watanabe <watanabe.yu+github@gmail.com>
2Date: Thu, 24 Feb 2022 08:20:44 +0900
3Subject: network: create stacked netdevs after the underlying link is
4 activated
5
6Origin: upstream, https://github.com/systemd/systemd-stable/commit/e74e1dc8cc339ee7bd6bc5c5a329f75ac5cf4821
7Bug-Ubuntu: https://launchpad.net/bugs/2000880
8
9Otherwise, the activation policy for the netdevs are ignored.
10
11Fixes #22593.
12
13(cherry picked from commit 047b9991a4d0d93d0dfe3d144410c619a8b74699)
14---
15 src/network/netdev/netdev.c | 5 +++++
16 1 file changed, 5 insertions(+)
17
18diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
19index 53534d4..2698e36 100644
20--- a/src/network/netdev/netdev.c
21+++ b/src/network/netdev/netdev.c
22@@ -557,6 +557,11 @@ static bool netdev_is_ready_to_create(NetDev *netdev, Link *link) {
23 if (ordered_set_contains(link->manager->request_queue, &req))
24 return false;
25
26+ /* If stacked netdevs are created before the underlying interface being activated, then
27+ * the activation policy for the netdevs are ignored. See issue #22593. */
28+ if (!link->activated)
29+ return false;
30+
31 return true;
32 }
33
diff --git a/debian/patches/lp2002445/sd-netlink-add-a-test-for-rtnl_set_link_name.patch b/debian/patches/lp2002445/sd-netlink-add-a-test-for-rtnl_set_link_name.patch
0new file mode 10064434new file mode 100644
index 0000000..d8db683
--- /dev/null
+++ b/debian/patches/lp2002445/sd-netlink-add-a-test-for-rtnl_set_link_name.patch
@@ -0,0 +1,81 @@
1From: Nick Rosbrook <nick.rosbrook@canonical.com>
2Date: Tue, 22 Nov 2022 17:01:47 -0500
3Subject: sd-netlink: add a test for rtnl_set_link_name()
4
5Origin: upstream, https://github.com/systemd/systemd/commit/b338a8bb40
6Bug-Ubuntu: https://launchpad.net/bugs/2002445
7
8Add a test that verifies a deleted alternative name is restored on error
9in rtnl_set_link_name().
10
11(modified to apply to v249.11)
12---
13 src/libsystemd/sd-netlink/test-netlink.c | 30 ++++++++++++++++++++++++++++++
14 1 file changed, 30 insertions(+)
15
16diff --git a/src/libsystemd/sd-netlink/test-netlink.c b/src/libsystemd/sd-netlink/test-netlink.c
17index 41a7280..6ee7f2d 100644
18--- a/src/libsystemd/sd-netlink/test-netlink.c
19+++ b/src/libsystemd/sd-netlink/test-netlink.c
20@@ -3,17 +3,20 @@
21 #include <net/if.h>
22 #include <netinet/ether.h>
23 #include <linux/genetlink.h>
24+#include <unistd.h>
25
26 #include "sd-netlink.h"
27
28 #include "alloc-util.h"
29 #include "ether-addr-util.h"
30 #include "macro.h"
31+#include "netlink-internal.h"
32 #include "netlink-util.h"
33 #include "socket-util.h"
34 #include "stdio-util.h"
35 #include "string-util.h"
36 #include "strv.h"
37+#include "tests.h"
38 #include "util.h"
39
40 static void test_message_link_bridge(sd_netlink *rtnl) {
41@@ -547,6 +550,32 @@ static void test_strv(sd_netlink *rtnl) {
42 assert_se(sd_netlink_message_exit_container(m) >= 0);
43 }
44
45+static void test_rtnl_set_link_name(sd_netlink *rtnl, int ifindex) {
46+ _cleanup_strv_free_ char **alternative_names = NULL;
47+ int r;
48+
49+ log_debug("/* %s */", __func__);
50+
51+ if (geteuid() != 0)
52+ return (void) log_tests_skipped("not root");
53+
54+ /* Test that the new name (which is currently an alternative name) is
55+ * restored as an alternative name on error. Create an error by using
56+ * an invalid device name, namely one that exceeds IFNAMSIZ
57+ * (alternative names can exceed IFNAMSIZ, but not regular names). */
58+ r = rtnl_set_link_alternative_names(&rtnl, ifindex, STRV_MAKE("testlongalternativename"));
59+ if (r == -EPERM)
60+ return (void) log_tests_skipped("missing required capabilities");
61+ if (r == -EOPNOTSUPP)
62+ return (void) log_tests_skipped("alternative name is not supported");
63+
64+ assert_se(r >= 0);
65+ assert_se(rtnl_set_link_name(&rtnl, ifindex, "testlongalternativename") == -EINVAL);
66+ assert_se(rtnl_get_link_alternative_names(&rtnl, ifindex, &alternative_names) >= 0);
67+ assert_se(strv_contains(alternative_names, "testlongalternativename"));
68+ assert_se(rtnl_delete_link_alternative_names(&rtnl, ifindex, STRV_MAKE("testlongalternativename")) >= 0);
69+}
70+
71 int main(void) {
72 sd_netlink *rtnl;
73 sd_netlink_message *m;
74@@ -576,6 +605,7 @@ int main(void) {
75 test_pipe(if_loopback);
76 test_event_loop(if_loopback);
77 test_link_configure(rtnl, if_loopback);
78+ test_rtnl_set_link_name(rtnl, if_loopback);
79
80 test_get_addresses(rtnl);
81 test_message_link_bridge(rtnl);
diff --git a/debian/patches/lp2002445/sd-netlink-do-not-swap-old-name-and-alternative-name.patch b/debian/patches/lp2002445/sd-netlink-do-not-swap-old-name-and-alternative-name.patch
0new file mode 10064482new file mode 100644
index 0000000..83ba680
--- /dev/null
+++ b/debian/patches/lp2002445/sd-netlink-do-not-swap-old-name-and-alternative-name.patch
@@ -0,0 +1,54 @@
1From: Nick Rosbrook <nick.rosbrook@canonical.com>
2Date: Fri, 2 Dec 2022 15:26:18 -0500
3Subject: sd-netlink: do not swap old name and alternative name
4
5Origin: upstream, https://github.com/systemd/systemd/commit/080afbb57c
6Bug-Ubuntu: https://launchpad.net/bugs/2002445
7
8Commit 434a348380 ("netlink: do not fail when new interface name is
9already used as an alternative name") added logic to set the old
10interface name as an alternative name, but only when the new name is
11currently an alternative name. This is not the desired outcome in most
12cases, and the important part of this commit was to delete the new name
13from the list of alternative names if necessary.
14
15(modified to apply to v249.11)
16---
17 src/libsystemd/sd-netlink/netlink-util.c | 10 ----------
18 1 file changed, 10 deletions(-)
19
20diff --git a/src/libsystemd/sd-netlink/netlink-util.c b/src/libsystemd/sd-netlink/netlink-util.c
21index 1211145..14eb2e9 100644
22--- a/src/libsystemd/sd-netlink/netlink-util.c
23+++ b/src/libsystemd/sd-netlink/netlink-util.c
24@@ -12,7 +12,6 @@
25 int rtnl_set_link_name(sd_netlink **rtnl, int ifindex, const char *name) {
26 _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *message = NULL;
27 _cleanup_strv_free_ char **alternative_names = NULL;
28- char old_name[IF_NAMESIZE + 1] = {};
29 int r;
30
31 assert(rtnl);
32@@ -32,8 +31,6 @@ int rtnl_set_link_name(sd_netlink **rtnl, int ifindex, const char *name) {
33 if (r < 0)
34 return log_debug_errno(r, "Failed to remove '%s' from alternative names on network interface %i: %m",
35 name, ifindex);
36-
37- format_ifname(ifindex, old_name);
38 }
39
40 r = sd_rtnl_message_new_link(*rtnl, &message, RTM_SETLINK, ifindex);
41@@ -48,13 +45,6 @@ int rtnl_set_link_name(sd_netlink **rtnl, int ifindex, const char *name) {
42 if (r < 0)
43 return r;
44
45- if (!isempty(old_name)) {
46- r = rtnl_set_link_alternative_names(rtnl, ifindex, STRV_MAKE(old_name));
47- if (r < 0)
48- log_debug_errno(r, "Failed to set '%s' as an alternative name on network interface %i, ignoring: %m",
49- old_name, ifindex);
50- }
51-
52 return 0;
53 }
54
diff --git a/debian/patches/lp2002445/sd-netlink-restore-altname-on-error-in-rtnl_set_link_name.patch b/debian/patches/lp2002445/sd-netlink-restore-altname-on-error-in-rtnl_set_link_name.patch
0new file mode 10064455new file mode 100644
index 0000000..1619e97
--- /dev/null
+++ b/debian/patches/lp2002445/sd-netlink-restore-altname-on-error-in-rtnl_set_link_name.patch
@@ -0,0 +1,64 @@
1From: Nick Rosbrook <nick.rosbrook@canonical.com>
2Date: Wed, 2 Nov 2022 05:36:14 -0400
3Subject: sd-netlink: restore altname on error in rtnl_set_link_name
4
5Origin: upstream, https://github.com/systemd/systemd/commit/4d600667f8
6Bug-Ubuntu: https://launchpad.net/bugs/2002445
7
8If a current alternative name is to be used to rename a network
9interface, the alternative name must be removed first. If interface
10renaming fails, restore the alternative name that was deleted if
11necessary.
12---
13 src/libsystemd/sd-netlink/netlink-util.c | 19 ++++++++++++++++---
14 1 file changed, 16 insertions(+), 3 deletions(-)
15
16diff --git a/src/libsystemd/sd-netlink/netlink-util.c b/src/libsystemd/sd-netlink/netlink-util.c
17index 88128d9..8a4c14c 100644
18--- a/src/libsystemd/sd-netlink/netlink-util.c
19+++ b/src/libsystemd/sd-netlink/netlink-util.c
20@@ -11,6 +11,7 @@
21 int rtnl_set_link_name(sd_netlink **rtnl, int ifindex, const char *name) {
22 _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *message = NULL;
23 _cleanup_strv_free_ char **alternative_names = NULL;
24+ bool altname_deleted = false;
25 int r;
26
27 assert(rtnl);
28@@ -30,21 +31,33 @@ int rtnl_set_link_name(sd_netlink **rtnl, int ifindex, const char *name) {
29 if (r < 0)
30 return log_debug_errno(r, "Failed to remove '%s' from alternative names on network interface %i: %m",
31 name, ifindex);
32+
33+ altname_deleted = true;
34 }
35
36 r = sd_rtnl_message_new_link(*rtnl, &message, RTM_SETLINK, ifindex);
37 if (r < 0)
38- return r;
39+ goto fail;
40
41 r = sd_netlink_message_append_string(message, IFLA_IFNAME, name);
42 if (r < 0)
43- return r;
44+ goto fail;
45
46 r = sd_netlink_call(*rtnl, message, 0, NULL);
47 if (r < 0)
48- return r;
49+ goto fail;
50
51 return 0;
52+
53+fail:
54+ if (altname_deleted) {
55+ int q = rtnl_set_link_alternative_names(rtnl, ifindex, STRV_MAKE(name));
56+ if (q < 0)
57+ log_debug_errno(q, "Failed to restore '%s' as an alternative name on network interface %i, ignoring: %m",
58+ name, ifindex);
59+ }
60+
61+ return r;
62 }
63
64 int rtnl_set_link_properties(
diff --git a/debian/patches/lp2002445/udev-attempt-device-rename-even-if-interface-is-up.patch b/debian/patches/lp2002445/udev-attempt-device-rename-even-if-interface-is-up.patch
0new file mode 10064465new file mode 100644
index 0000000..4d007cd
--- /dev/null
+++ b/debian/patches/lp2002445/udev-attempt-device-rename-even-if-interface-is-up.patch
@@ -0,0 +1,63 @@
1From: Nick Rosbrook <nick.rosbrook@canonical.com>
2Date: Fri, 2 Dec 2022 15:35:25 -0500
3Subject: udev: attempt device rename even if interface is up
4
5Origin: upstream, https://github.com/systemd/systemd/commit/53584e7b61
6Bug-Ubuntu: https://launchpad.net/bugs/2002445
7
8Currently rename_netif() will not attempt to rename a device if it is
9already up, because the kernel will return -EBUSY unless live renaming
10is allowed on the device. This restriction will be removed in a future
11kernel version [1].
12
13To cover both cases, always attempt to rename the interface and return 0
14if we get -EBUSY.
15
16[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=bd039b5ea2a9
17
18(modified to apply to v249.11)
19---
20 src/udev/udev-event.c | 16 +++++-----------
21 1 file changed, 5 insertions(+), 11 deletions(-)
22
23diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
24index 56fe0a4..84822d9 100644
25--- a/src/udev/udev-event.c
26+++ b/src/udev/udev-event.c
27@@ -828,7 +828,6 @@ int udev_event_spawn(UdevEvent *event,
28 static int rename_netif(UdevEvent *event) {
29 sd_device *dev = event->dev;
30 const char *oldname;
31- unsigned flags;
32 int ifindex, r;
33
34 if (!event->name)
35@@ -856,16 +855,6 @@ static int rename_netif(UdevEvent *event) {
36 return 0;
37 }
38
39- r = rtnl_get_link_info(&event->rtnl, ifindex, NULL, &flags);
40- if (r < 0)
41- return log_device_warning_errno(dev, r, "Failed to get link flags: %m");
42-
43- if (FLAGS_SET(flags, IFF_UP)) {
44- log_device_info(dev, "Network interface '%s' is already up, refusing to rename to '%s'.",
45- oldname, event->name);
46- return 0;
47- }
48-
49 /* Set ID_RENAMING boolean property here, and drop it in the corresponding move uevent later. */
50 r = device_add_property(dev, "ID_RENAMING", "1");
51 if (r < 0)
52@@ -887,6 +876,11 @@ static int rename_netif(UdevEvent *event) {
53 return log_device_debug_errno(event->dev_db_clone, r, "Failed to update database under /run/udev/data/: %m");
54
55 r = rtnl_set_link_name(&event->rtnl, ifindex, event->name);
56+ if (r == -EBUSY) {
57+ log_device_info(dev, "Network interface '%s' is already up, cannot rename to '%s'.",
58+ oldname, event->name);
59+ return 0;
60+ }
61 if (r < 0)
62 return log_device_error_errno(dev, r, "Failed to rename network interface %i from '%s' to '%s': %m",
63 ifindex, oldname, event->name);
diff --git a/debian/patches/lp2002445/udev-net-allow-new-link-name-as-an-altname-before-renamin.patch b/debian/patches/lp2002445/udev-net-allow-new-link-name-as-an-altname-before-renamin.patch
0new file mode 10064464new file mode 100644
index 0000000..2b00cd7
--- /dev/null
+++ b/debian/patches/lp2002445/udev-net-allow-new-link-name-as-an-altname-before-renamin.patch
@@ -0,0 +1,36 @@
1From: Nick Rosbrook <nick.rosbrook@canonical.com>
2Date: Wed, 2 Nov 2022 11:05:01 -0400
3Subject: udev/net: allow new link name as an altname before renaming happens
4
5Origin: upstream, https://github.com/systemd/systemd/commit/d0b31efc1a
6Bug-Ubuntu: https://launchpad.net/bugs/2002445
7
8When configuring a link's alternative names, the link's new name to-be
9is not allowed to be included because interface renaming will fail if
10the new name is already present as an alternative name. However,
11rtnl_set_link_name will delete the conflicting alternative name before
12renaming the device, if necessary.
13
14Allow the new link name to be set as an alternative name before the
15device is renamed. This means that if the rename is later skipped (i.e.
16because the link is already up), then the name can at least still be
17present as an alternative name.
18
19(modified to apply to v249.11)
20---
21 src/udev/net/link-config.c | 2 --
22 1 file changed, 2 deletions(-)
23
24diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
25index 8dfe236..bb9bd37 100644
26--- a/src/udev/net/link-config.c
27+++ b/src/udev/net/link-config.c
28@@ -578,8 +578,6 @@ static int link_config_apply_alternative_names(sd_netlink **rtnl, const LinkConf
29 }
30 }
31
32- if (new_name)
33- strv_remove(altnames, new_name);
34 strv_remove(altnames, current_name);
35
36 r = rtnl_get_link_alternative_names(rtnl, ifindex, &current_altnames);
diff --git a/debian/patches/lp2004478-network-dhcp4-accept-local-subnet-routes-from-DHCP.patch b/debian/patches/lp2004478-network-dhcp4-accept-local-subnet-routes-from-DHCP.patch
0new file mode 10064437new file mode 100644
index 0000000..344fdd7
--- /dev/null
+++ b/debian/patches/lp2004478-network-dhcp4-accept-local-subnet-routes-from-DHCP.patch
@@ -0,0 +1,54 @@
1From: Tuetuopay <tuetuopay@me.com>
2Date: Fri, 27 Jan 2023 15:10:49 +0100
3Subject: network/dhcp4: accept local subnet routes from DHCP
4
5Origin: upstream, https://github.com/systemd/systemd/commit/1d84a3c7792a8910b05904937c703307ca19740f
6Bug-Ubuntu: https://launchpad.net/bugs/2004478
7
8RFC3442 specifies option 121 (Classless Static Routes) that allow a DHCP
9server to push arbitrary routes to a client. It has a Local Subnet
10Routes section expliciting the behavior of routes with a null (0.0.0.0)
11gateway.
12
13Such routes are to be installed on the interface with a Link scope, to
14mark them as directly available on the link without any gateway.
15
16Networkd currently drops those routes, which is against the RFC, as
17Linux has proper support for such routes.
18
19Fixes: 7f20627 ("network: dhcp4: ignore gateway in static routes if destination is link-local or in the same network")
20---
21 src/network/networkd-dhcp4.c | 19 +++++++++++--------
22 1 file changed, 11 insertions(+), 8 deletions(-)
23
24diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
25index f80adcd..9b06edc 100644
26--- a/src/network/networkd-dhcp4.c
27+++ b/src/network/networkd-dhcp4.c
28@@ -349,15 +349,18 @@ static int dhcp4_request_route_auto(
29 route->gw = IN_ADDR_NULL;
30 route->prefsrc.in = address;
31
32- } else {
33- if (in4_addr_is_null(gw)) {
34- log_link_debug(link, "DHCP: requested route destination "IPV4_ADDRESS_FMT_STR"/%u is not in the assigned network "
35- IPV4_ADDRESS_FMT_STR"/%u, but no gateway is specified, ignoring.",
36- IPV4_ADDRESS_FMT_VAL(route->dst.in), route->dst_prefixlen,
37- IPV4_ADDRESS_FMT_VAL(prefix), prefixlen);
38- return 0;
39- }
40+ } else if (in4_addr_is_null(gw)) {
41+ log_link_debug(link, "DHCP: requested route destination "IPV4_ADDRESS_FMT_STR"/%u is not in the assigned network "
42+ IPV4_ADDRESS_FMT_STR"/%u, but no gateway is specified, using 'link' scope.",
43+ IPV4_ADDRESS_FMT_VAL(route->dst.in), route->dst_prefixlen,
44+ IPV4_ADDRESS_FMT_VAL(prefix), prefixlen);
45+
46+ route->scope = RT_SCOPE_LINK;
47+ route->gw_family = AF_UNSPEC;
48+ route->gw = IN_ADDR_NULL;
49+ route->prefsrc.in = address;
50
51+ } else {
52 r = dhcp4_request_route_to_gateway(link, gw);
53 if (r < 0)
54 return r;
diff --git a/debian/patches/lp2009502-Enable-dev-sgx_vepc-access-for-the-group-sgx.patch b/debian/patches/lp2009502-Enable-dev-sgx_vepc-access-for-the-group-sgx.patch
0new file mode 10064455new file mode 100644
index 0000000..2f5adf2
--- /dev/null
+++ b/debian/patches/lp2009502-Enable-dev-sgx_vepc-access-for-the-group-sgx.patch
@@ -0,0 +1,27 @@
1From: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
2Date: Sat, 11 Dec 2021 06:39:59 +0200
3Subject: Enable /dev/sgx_vepc access for the group 'sgx'
4
5Origin: upstream, https://github.com/systemd/systemd/commit/b5d3138f9177bbc3505f42ba073d08d4f90b4888
6Bug-Ubuntu: https://launchpad.net/bugs/2009502
7
8Enable /dev/sgx_vepc access for the group 'sgx', which allows KVM-backed VMs
9to host Intel Software Guard eXtension (SGX) enclaves. The upcoming QEMU
106.2 uses /dev/sgx_vepc to reserve portions of Enclave Page Cache (EPC) for
11VMs. EPC is the reserved physical memory used for hosting enclaves.
12---
13 rules.d/50-udev-default.rules.in | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
17index 18a3cf4..685b59a 100644
18--- a/rules.d/50-udev-default.rules.in
19+++ b/rules.d/50-udev-default.rules.in
20@@ -40,6 +40,7 @@ SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="{{GROUP_RENDER_MODE}
21 SUBSYSTEM=="kfd", GROUP="render", MODE="{{GROUP_RENDER_MODE}}"
22
23 SUBSYSTEM=="misc", KERNEL=="sgx_enclave", GROUP="sgx", MODE="0660"
24+SUBSYSTEM=="misc", KERNEL=="sgx_vepc", GROUP="sgx", MODE="0660"
25
26 # When using static_node= with non-default permissions, also update
27 # tmpfiles.d/static-nodes-permissions.conf.in to keep permissions synchronized.
diff --git a/debian/patches/series b/debian/patches/series
index 8bbe6c3..fb23adf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -99,3 +99,11 @@ lp1988078-sd-hwdb-include-sys-stat.h-in-hwdb-internal.h.patch
99lp1988078-sd-hwdb-add-sd_hwdb_new_from_path.patch99lp1988078-sd-hwdb-add-sd_hwdb_new_from_path.patch
100lp1988078-hwdb-implement-root-option-for-systemd-hwdb-query.patch100lp1988078-hwdb-implement-root-option-for-systemd-hwdb-query.patch
101lp1988994-Deny-list-TEST-58-REPART-on-ppc64el.patch101lp1988994-Deny-list-TEST-58-REPART-on-ppc64el.patch
102lp2004478-network-dhcp4-accept-local-subnet-routes-from-DHCP.patch
103lp2002445/udev-net-allow-new-link-name-as-an-altname-before-renamin.patch
104lp2002445/sd-netlink-do-not-swap-old-name-and-alternative-name.patch
105lp2002445/sd-netlink-restore-altname-on-error-in-rtnl_set_link_name.patch
106lp2002445/udev-attempt-device-rename-even-if-interface-is-up.patch
107lp2002445/sd-netlink-add-a-test-for-rtnl_set_link_name.patch
108lp2000880-network-create-stacked-netdevs-after-the-underlying-link-.patch
109lp2009502-Enable-dev-sgx_vepc-access-for-the-group-sgx.patch

Subscribers

People subscribed via source and target branches