netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ka-cheong.poon@oracle.com
Cc: netdev@vger.kernel.org, santosh.shilimkar@oracle.com,
	rds-devel@oss.oracle.com
Subject: Re: [PATCH v2 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr
Date: Sat, 30 Jun 2018 17:50:49 +0900 (KST)	[thread overview]
Message-ID: <20180630.175049.1607480149466051192.davem@davemloft.net> (raw)
In-Reply-To: <693463ed87c5956eed05a6266c4edf354ab3d51a.1530086216.git.ka-cheong.poon@oracle.com>

From: Ka-Cheong Poon <ka-cheong.poon@oracle.com>
Date: Wed, 27 Jun 2018 03:23:27 -0700

> This patch changes the internal representation of an IP address to use
> struct in6_addr.  IPv4 address is stored as an IPv4 mapped address.
> All the functions which take an IP address as argument are also
> changed to use struct in6_addr.  But RDS socket layer is not modified
> such that it still does not accept IPv6 address from an application.
> And RDS layer does not accept nor initiate IPv6 connections.
> 
> v2: Fixed sparse warnings.
> 
> Signed-off-by: Ka-Cheong Poon <ka-cheong.poon@oracle.com>

I really don't like this.

An ipv4 mapped ipv6 address is not the same as an ipv4 address.

You are effectively preventing the use of ipv6 connections
using ipv4 mapped addresses.

Also, assuming the sockaddr type based upon size is wrong.
You have to check the family field, then you can decide
to interpret the rest of the sockaddr in one way or another
and also validate it's length.

  reply	other threads:[~2018-06-30  8:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27 10:23 [PATCH v2 net-next 0/3] rds: IPv6 support Ka-Cheong Poon
2018-06-27 10:23 ` [PATCH v2 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr Ka-Cheong Poon
2018-06-30  8:50   ` David Miller [this message]
2018-07-03 14:02     ` Ka-Cheong Poon
2018-07-05 17:58   ` Santosh Shilimkar
2018-07-06  9:08     ` Ka-Cheong Poon
2018-07-06 10:15       ` Sowmini Varadhan
2018-07-06 15:08         ` Ka-Cheong Poon
2018-07-06 15:25           ` Sowmini Varadhan
2018-07-06 17:26             ` Santosh Shilimkar
2018-07-09 12:26               ` Ka-Cheong Poon
2018-07-06 14:55       ` santosh.shilimkar
2018-06-27 10:23 ` [PATCH v2 net-next 2/3] rds: Enable RDS IPv6 support Ka-Cheong Poon
2018-06-27 10:23 ` [PATCH v2 net-next 3/3] rds: Extend RDS API for " Ka-Cheong Poon
2018-07-05 17:44 ` [PATCH v2 net-next 0/3] rds: " Sowmini Varadhan
2018-07-06 14:36   ` Ka-Cheong Poon
2018-07-06 15:14     ` Sowmini Varadhan
2018-07-09 12:24       ` Ka-Cheong Poon

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=20180630.175049.1607480149466051192.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ka-cheong.poon@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --cc=santosh.shilimkar@oracle.com \
    /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;
as well as URLs for NNTP newsgroup(s).