From b8d690b9aa34df2c81ea43be7a67731f3a7dee44 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 30 Apr 2013 19:24:22 +0200 Subject: [PATCH] libc_lwip: accept 'AF_INET' sockets only lwIP only supports the 'AF_INET' domain, but doesn't check the 'domain' argument of the 'lwip_socket()' function. This patch avoids an error message from lwIP when the Arora browser tries to connect a socket of the 'AF_LOCAL' domain. Fixes #732. --- libports/src/lib/libc_lwip/plugin.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libports/src/lib/libc_lwip/plugin.cc b/libports/src/lib/libc_lwip/plugin.cc index e860a652a2..c7338e6328 100644 --- a/libports/src/lib/libc_lwip/plugin.cc +++ b/libports/src/lib/libc_lwip/plugin.cc @@ -260,9 +260,12 @@ bool Plugin::supports_select(int nfds, } -bool Plugin::supports_socket(int, int, int) +bool Plugin::supports_socket(int domain, int, int) { - return true; + if (domain == AF_INET) + return true; + + return false; }