chiark / gitweb /
core: do not make sockets dependent on lo
authorMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Sat, 12 Jan 2013 22:05:52 +0000 (23:05 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 15 Jan 2013 20:00:11 +0000 (21:00 +0100)
/sys/subsystem/net/devices/lo is never considered active, so sockets
with BindToDevice=lo would never be activated.

src/core/socket.c

index fcbcdbe..d755040 100644 (file)
@@ -308,7 +308,7 @@ static int socket_add_device_link(Socket *s) {
 
         assert(s);
 
-        if (!s->bind_to_device)
+        if (!s->bind_to_device || streq(s->bind_to_device, "lo"))
                 return 0;
 
         if (asprintf(&t, "/sys/subsystem/net/devices/%s", s->bind_to_device) < 0)