> If you're going to use callbacks, and I'd be also asking you to
Well, I didn't want to make 2 copies of completely identical
code and then just change the protocol setsockopt code we call at
the end of it. If we did this:
compat_ipv6_setsockopt()
{
if (got an MCAST* optval)
return compat_mc_setsockopt(....optval, optlen,
ipv6_setsockopt);
}
and in compat_mc_setsockopt:
int compat_mc_setsockopt(...., func decl) {
...all common code that twiddles args for both IPv6 and IPv4
return func(....);
}
Then there are no cross references to anything else in the
compat code and we can't get there with func==ipv6_setsockopt unless
we were called from compat_ipv6_setsockopt(), which means we must have
ipv6_setsockopt(). Right? The protocol setsockopt functions are already
external, so I'd expect compat would need any CONFIG guarding. Am I
missing something?
+-DLS
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html