Alon Bar-Lev
2007-Oct-29 05:09 UTC
[Bridge] [PATCH] Allow bridge-utils 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 bridge-utils-1.2.org/libbridge/libbridge_init.c bridge-utils-1.2/libbridge/libbridge_init.c --- bridge-utils-1.2.org/libbridge/libbridge_init.c 2006-09-09 08:30:31.000000000 +0300 +++ bridge-utils-1.2/libbridge/libbridge_init.c 2007-10-30 05:11:10.000000000 +0200 @@ -32,7 +32,7 @@ int br_socket_fd = -1; int br_init(void) { - if ((br_socket_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) + if ((br_socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) return errno; return 0; }