From: Patrick McHardy <kaber@trash.net>
To: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Cc: netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org
Subject: Re: [RFC][NETFILTER]: ip6_tables: fixed conflicted optname for getsockopt
Date: Fri, 03 Nov 2006 11:13:50 +0100 [thread overview]
Message-ID: <454B165E.6080305@trash.net> (raw)
In-Reply-To: <200610311210.k9VCAmsu003163@toshiba.co.jp>
Yasuyuki KOZAKAI wrote:
> Hi all,
>
> I've noticed that 66 and 67 for getsockopt on IPv6 socket are doubly used
> by IPv6 Advanced API and Netfilter ip6tables.
>
> The following patch changes numbers for Netfilter to 68 and 69.
> That doesn't change the behavior of old userland binary.
>
> What do you think ?
>
> In detail:
>
> These numbers are defined in include/linux/in6.h and
> include/linux/netfilter_ipv6/ip6_tables.h
> (via include/linux/netfilter/x_tables).
>
> 66: IPV6_RECVTCLASS and IP6T_GET_REVISION_MATCH
> 67: IPV6_TCLASS and IP6T_GET_REVISION_TARGET
>
> The current kernel always calls functions of Advanced API for them,
> and return 0 which means success for IP6T_GET_REVISION_{MATCH,TARGET}.
> Then userland tool might believe that newer revision of match/target is
> supported.
>
> Currently I cannot see big problem on this because userland tools can
> use newer revision in kernel anyway. But clearly they should be fixed.
It might be a problem with binaries compiled against the new definitions
running with old kernels, they can't detect supported revisions anymore.
But we currently don't support revisions in ip6tables userspace anyway
unless I'm missing something.
> The following patch changes numbers for Netfilter to 68 and 69.
> An other possible solution is to distinguish them by something like
> optlen of getsockopt argument, but I'm not sure this is best.
I prefer this patch unless we break something badly. Do you want me
to apply it?
next parent reply other threads:[~2006-11-03 10:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200610311210.k9VCAmsu003163@toshiba.co.jp>
2006-11-03 10:13 ` Patrick McHardy [this message]
2006-11-03 13:15 ` [RFC][NETFILTER]: ip6_tables: fixed conflicted optname for getsockopt Yasuyuki KOZAKAI
[not found] ` <200611031315.kA3DFu6K012725@toshiba.co.jp>
2006-11-06 13:51 ` Patrick McHardy
2006-10-31 12:10 Yasuyuki KOZAKAI
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=454B165E.6080305@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@lists.netfilter.org \
--cc=usagi-core@linux-ipv6.org \
--cc=yasuyuki.kozakai@toshiba.co.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.