summaryrefslogtreecommitdiff
path: root/src/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-10 03:27:00 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-10 03:27:00 +0200
commit7a22745ac3c267edf89a23a920a28d86df5d0f9a (patch)
tree111d4115e6c740bc6df2f5dbcca00415c18a8432 /src/load-fragment.c
parentb9a2a36b519ccd79c4198e7dda4e657d597a14ad (diff)
socket: support netlink sockets
Diffstat (limited to 'src/load-fragment.c')
-rw-r--r--src/load-fragment.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/load-fragment.c b/src/load-fragment.c
index aac27b56ed..3440d9158f 100644
--- a/src/load-fragment.c
+++ b/src/load-fragment.c
@@ -220,6 +220,15 @@ static int config_parse_listen(
}
path_kill_slashes(p->path);
+ } else if (streq(lvalue, "ListenNetlink")) {
+ p->type = SOCKET_SOCKET;
+
+ if (socket_address_parse_netlink(&p->address, rvalue) < 0) {
+ log_error("[%s:%u] Failed to parse address value, ignoring: %s", filename, line, rvalue);
+ free(p);
+ return 0;
+ }
+
} else {
p->type = SOCKET_SOCKET;
@@ -1892,6 +1901,7 @@ static int load_from_path(Unit *u, const char *path) {
{ "ListenDatagram", config_parse_listen, 0, &u->socket, "Socket" },
{ "ListenSequentialPacket", config_parse_listen, 0, &u->socket, "Socket" },
{ "ListenFIFO", config_parse_listen, 0, &u->socket, "Socket" },
+ { "ListenNetlink", config_parse_listen, 0, &u->socket, "Socket" },
{ "BindIPv6Only", config_parse_socket_bind, 0, &u->socket, "Socket" },
{ "Backlog", config_parse_unsigned, 0, &u->socket.backlog, "Socket" },
{ "BindToDevice", config_parse_bindtodevice, 0, &u->socket, "Socket" },