blob: 5daa4534eb493d194b315cb57156e7bcf38a87cc [file] [log] [blame]
[PATCH] Allow ifplugd to run when no TCP/IP is available
This simple patch create AF_LOCAL socket instead of AF_INET so if TCP/IP
is not linked into kernel it still works.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
diff -urNp ifplugd-0.28.org/src/ifplugd.c ifplugd-0.28/src/ifplugd.c
--- ifplugd-0.28.org/src/ifplugd.c 2005-06-04 22:21:51.000000000 +0300
+++ ifplugd-0.28/src/ifplugd.c 2007-10-30 05:22:53.000000000 +0200
@@ -409,7 +409,7 @@ void work(void) {
break;
}
- if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+ if ((fd = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) {
daemon_log(LOG_ERR, "socket(): %s", strerror(errno));
goto finish;
}