[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130602220645.GA14760@breakpoint.cc>
Date: Mon, 3 Jun 2013 00:06:45 +0200
From: Florian Westphal <fw@...len.de>
To: Lorenzo Colitti <lorenzo@...gle.com>
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
netfilter-devel@...r.kernel.org,
David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH 1/5] netfilter: add nf_ipv6_ops hook to fix xt_addrtype
with IPv6
Lorenzo Colitti <lorenzo@...gle.com> wrote:
> > While the former might seem preferable, Pablo pointed out that there
> > are more xt modules with link-time dependeny issues regarding ipv6,
> > so lets go for 2).
>
> I had to do this recently for the ping socket as well:
>
> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=6d0bfe22611602f36617bc7aa2ffa1bbb2f54c67
>
> +/* Compatibility glue so we can support IPv6 when it's compiled as a module */
> +struct pingv6_ops {
> [...]
> + int (*ipv6_chk_addr)(struct net *net, const struct in6_addr *addr,
> + struct net_device *dev, int strict);
> +};
>
> Is it a better idea to share these structures and have just one
> structure containing all IPv6 dummy functions?
I think so, yes.
> If it was in an include
> file, it would be easily accessible to most of the tree even when
> CONFIG_IPV6={n,m}, and we could have the ipv6 module init (and exit)
> code just set all the function pointers. That way, we wouldn't have to
> reinvent this particular wheel in multiple places of the code.
FWIW, I agree. We should avoid having multiple copies of this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists