lkml.org 
[lkml]   [2000]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPROBLEM: SO_DETACH_FILTER has no parameters, but is checked to have some
Summary:
SO_DETACH_FILTER does not accept any parameter, but code in sock.c check for it.

Problem description:
Trying to remove attached filter i got EINVAL (and the filter was left
attached).
The code setsockopt(fd, SOL_SOCKET, SO_DETACH_FILTER, 0, 0) is correct,
but does work.
Looking in sock.c i have found that SO_DETACH_FILTER is set after checking
parameters of an option. It is not correct in this particular case
(it should be handled like SO_DONTLINGER).
Search for: SO_DETACH_FILTER in sock.c
The problem persists up to 2.4.0-test10.

Workaround:
int dummy;
setsockopt(fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(int));

Keywords: networking filter setsockopt SO_DETACH_FILTER

scripts/ver_linux:
-- Versions installed: (if some fields are empty or looks
-- unusual then possibly you have very old versions)
Linux ws018 2.2.17 #6 Thu Nov 16 12:30:28 CET 2000 i686 unknown
Kernel modules 2.3.11
Gnu C 2.95.2
Binutils 2.9.5.0.37
Linux C Library 2.1.3
Dynamic linker ldd: version 1.9.11
Procps 2.0.6
Mount 2.10f
Net-tools 2.05
Console-tools 0.2.3
Sh-utils 2.0
Modules Loaded 3c59x nls_koi8-r ntfs smbfs vfat fat nls_iso8859-2 nls_iso8859-1 nls_cp866 binfmt_misc autofs nfs lockd sunrpc nbd

Sincerely yours,
Alexander Riesen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:51    [W:0.038 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site