mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steve G <linux_4ever@yahoo.com>
To: linux-kernel@vger.kernel.org, davem@redhat.com
Subject: [PATCH] 2.4.18 IPV6_ADDRFORM
Date: Thu, 3 Oct 2002 06:27:27 -0700 (PDT)	[thread overview]
Message-ID: <20021003132727.70505.qmail@web9604.mail.yahoo.com> (raw)

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

             reply	other threads:[~2002-10-03 13:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-03 13:27 Steve G [this message]
2002-10-03 13:24 ` David S. Miller

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=20021003132727.70505.qmail@web9604.mail.yahoo.com \
    --to=linux_4ever@yahoo.com \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®