summaryrefslogtreecommitdiff
path: root/src/basic/missing_socket.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-05-26 23:27:20 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-05-29 15:28:10 +0900
commitf6dbcebdc28cabf36e6665b67d52d43192fb88df (patch)
tree78e352676b149fb55ffdb080c28880cea35bf1ea /src/basic/missing_socket.h
parent8abbd9a4d94ef3d66b4d04f0584921b35059c3f9 (diff)
downloadsystemd-f6dbcebdc28cabf36e6665b67d52d43192fb88df.tar.gz
sd-device: check netlink netns matches host netns before using monitor
Tracking down #15931 confused the hell out of me, since running homed in gdb from the command line worked fine, but doing so as a service failed. Let's make this more debuggable and check if we live in the host netns when allocating a new udev monitor. This is just debug stuff, so that if things don't work, a quick debug run will reveal what is going on. That said, while we are at it, also fix unexpected closing of passed in fd when failing.
Diffstat (limited to 'src/basic/missing_socket.h')
-rw-r--r--src/basic/missing_socket.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/basic/missing_socket.h b/src/basic/missing_socket.h
index 276be366c3..8c3fec1e35 100644
--- a/src/basic/missing_socket.h
+++ b/src/basic/missing_socket.h
@@ -62,3 +62,8 @@ struct sockaddr_vm {
#ifndef IP_TRANSPARENT
#define IP_TRANSPARENT 19
#endif
+
+/* linux/sockios.h */
+#ifndef SIOCGSKNS
+#define SIOCGSKNS 0x894C
+#endif