[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b00cb3a-0ed7-d746-8377-a0ee9d103cdf@oracle.com>
Date: Tue, 3 Jul 2018 22:02:33 +0800
From: Ka-Cheong Poon <ka-cheong.poon@...cle.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, santosh.shilimkar@...cle.com,
rds-devel@....oracle.com
Subject: Re: [PATCH v2 net-next 1/3] rds: Changing IP address internal
representation to struct in6_addr
On 06/30/2018 04:50 PM, David Miller wrote:
> From: Ka-Cheong Poon <ka-cheong.poon@...cle.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@...cle.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.
Could you please clarify what is meant by an IPv6
connections using IPv4 mapped address? An IPv6 packet
cannot use an IPv4 mapped address as source or destination
address. Do you mean an app uses an IPv4 mapped address
in a struct sockaddr_in6 to set up an IPv4 connection?
Please note that this patch is patch #1. This patch
alone does not support RDS/IPv6. Hence this patch has
checks to prevent an app to use IPv6 address. Those
checks will be removed in patch #2.
> 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.
>
--
K. Poon
ka-cheong.poon@...cle.com
Powered by blists - more mailing lists