public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Riesen <ariesen@public.ndh.com>
To: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	"David S. Miller" <davem@redhat.com>
Subject: PROBLEM: SO_DETACH_FILTER has no parameters, but is checked to have some
Date: Fri, 8 Dec 2000 10:46:02 +0100	[thread overview]
Message-ID: <20001208104602.A27159@traian.de> (raw)

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/

                 reply	other threads:[~2000-12-08 12:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001208104602.A27159@traian.de \
    --to=ariesen@public.ndh.com \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox