The attached patch is created against 2.4.18 (but
2.4.19 seems very close). It adds support for
IPV6_ADDRFORM getsockopt. I sent a patch earlier
deleting IPV6_ADDRFORM from 2.5, but since 2.4 has
IPV6_ADDRFORM defined (and its shipped), it should be
supported rather than deleted.
Cheers,
Steve Grubb
-------
diff -ur linux-2.4.18/net/ipv6/ipv6_sockglue.c
linux-2.4.18a/net/ipv6/ipv6_sockglue.c
--- linux-2.4.18/net/ipv6/ipv6_sockglue.c Thu Sep 20
17:12:56 2001
+++ linux-2.4.18a/net/ipv6/ipv6_sockglue.c Thu Oct 3
09:23:55 2002
@@ -412,6 +412,16 @@
if (get_user(len, optlen))
return -EFAULT;
switch (optname) {
+ case IPV6_ADDRFORM:
+ if (sk->protocol != IPPROTO_UDP &&
+ sk->protocol != IPPROTO_TCP)
+ return -EINVAL;
+
+ if (sk->state != TCP_ESTABLISHED)
+ return -ENOTCONN;
+
+ val = sk->family;
+ break;
case IPV6_PKTOPTIONS:
{
struct msghdr msg;
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
From: Steve G <[email protected]>
Date: Thu, 3 Oct 2002 06:27:27 -0700 (PDT)
diff -ur linux-2.4.18/net/ipv6/ipv6_sockglue.c
linux-2.4.18a/net/ipv6/ipv6_sockglue.c
--- linux-2.4.18/net/ipv6/ipv6_sockglue.c Thu Sep 20
17:12:56 2001
+++ linux-2.4.18a/net/ipv6/ipv6_sockglue.c Thu Oct 3
09:23:55 2002
Your mail client adds line breaks to the patch making it
unapplyable, please fix your mail client not to do this
and resend the patch.
Thanks.