Re: [PATCH] IB/srp: Fix IPv6 address parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 08, 2018 at 03:18:54AM +0000, Bart Van Assche wrote:
> On Wed, 2018-03-07 at 20:10 -0700, Jason Gunthorpe wrote:
> > On Wed, Mar 07, 2018 at 04:54:14PM -0800, Bart Van Assche wrote:
> > > Split IPv6 addresses at the colon that separates the IPv6 address
> > > and the port number instead of at a colon in the middle of the IPv6
> > > address.
> > 
> > That isn't how IPv6 addresses are supposed to be represented..
> > 
> > A IPv6 with a port should be enclosed in [] eg
> > 
> > [2001::123]:12
> 
> Hello Jason,
> 
> The patch I posted fixes parsing of IPv6 addresses like the one in your
> example. Did I perhaps misunderstand something?

?? I don't see any handling of [] in the code?

Doesn't the code split the above into

'[2001::123]' and '12'

Then pass that to inet_pton_with_scope which will barf on the []
address?

It is just very jarring to see code handling IPv6 addresses + port and
not use the standard/expected [] notation.

Jason
 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux