>>> "Fu, Siyuan" <siyuan...@intel.com> 2015/11/5 上午 8:44 >>> > Hi, Lin > > If you are using IPv6 address in URL you should enclose the IP address within > square brackets ("[" and "]"), like > http://[2000:aaaa:1]:3260/boot.efi > Please refer to RFC3986 > http://tools.ietf.org/html/rfc3986#section-3.2.2
Hi Siyuan, Here is my testing url: http://[2001:db8:f00f:cafe::1]/shim.efi NetHttpParseAuthorityChar() returned UrlParserPortStart when it encountered a colon so NetHttpParseAuthority() thought the host was "[2001" and the port was "db8:f00f:cafe::1]". Since "[2001" is not a valid IPv6 address, in the end, HttpBootParseDhcp6Packet() set IpExpressedUri to FALSE, and the IP address was never extracted from the the url. Cheers, Gary Lin > Siyuan -----Original Message----- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Gary Ching-Pang Lin Sent: Wednesday, November 4, 2015 6:40 PM To: Zhang, Lubo <lubo.zh...@intel.com> Cc: Ye, Ting <ting...@intel.com>; edk2-devel@lists.01.org; Wu, Jiaxin <jiaxin...@intel.com>; Fu, Siyuan <siyuan...@intel.com> Subject: Re: [edk2] [PATCH v2] NetworkPkg:Enable Http Boot over Ipv6 stack On Tue, Nov 03, 2015 at 04:13:27PM +0800, Zhang Lubo wrote: > v2: > *Rewrite the logic of setting ipv6 gateway in httpboot driver and update some > comment. > > Fix a potential bug which can cause assert when setting ipv6 Gateway. > If there is no router in network environment, it will fail to find out > the gateway address which can route the message to Http Server Ip . > When it check the IP6 route table again 1 seconds later, it will > assert while the router table structure had been freed last time without > retrieve new relevant data form ip6 driver. > Hi Lubo, I applied the patch and it worked as expected except the IP expressed url. I checked the code and found the function(*) to parse the url couldn't handle IPv6 and just treat the colon as a separator of the host name and port. Is this a known issue? Cheers, Gary Lin (*) MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c::NetHttpParseAuthority() > Cc: Fu Siyuan <siyuan...@intel.com> > Cc: Ye Ting <ting...@intel.com> > CC: Wu Jiaxin <jiaxin...@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Zhang Lubo <lubo.zh...@intel.com> > --- > NetworkPkg/HttpBootDxe/HttpBootClient.c | 234 ++++- > NetworkPkg/HttpBootDxe/HttpBootComponentName.c | 5 +- > NetworkPkg/HttpBootDxe/HttpBootDhcp4.c | 12 +- > NetworkPkg/HttpBootDxe/HttpBootDhcp4.h | 11 + > NetworkPkg/HttpBootDxe/HttpBootDhcp6.c | 984 +++++++++++++++++++ > NetworkPkg/HttpBootDxe/HttpBootDhcp6.h | 198 ++++ > NetworkPkg/HttpBootDxe/HttpBootDxe.c | 903 +++++++++++++++--- > NetworkPkg/HttpBootDxe/HttpBootDxe.h | 159 +++- > NetworkPkg/HttpBootDxe/HttpBootDxe.inf | 9 + > NetworkPkg/HttpBootDxe/HttpBootImpl.c | 109 ++- > NetworkPkg/HttpBootDxe/HttpBootImpl.h | 2 +- > NetworkPkg/HttpBootDxe/HttpBootSupport.c | 292 +++++- > NetworkPkg/HttpBootDxe/HttpBootSupport.h | 70 ++ > NetworkPkg/HttpDxe/HttpDns.c | 207 +++- > NetworkPkg/HttpDxe/HttpDns.h | 20 + > NetworkPkg/HttpDxe/HttpDriver.c | 806 +++++++++++----- > NetworkPkg/HttpDxe/HttpDriver.h | 143 ++- > NetworkPkg/HttpDxe/HttpDxe.inf | 5 + > NetworkPkg/HttpDxe/HttpImpl.c | 358 +++---- > NetworkPkg/HttpDxe/HttpImpl.h | 1 - > NetworkPkg/HttpDxe/HttpProto.c | 1210 > ++++++++++++++++++++---- > NetworkPkg/HttpDxe/HttpProto.h | 182 +++- > 22 files changed, 5017 insertions(+), 903 deletions(-) create mode > 100644 NetworkPkg/HttpBootDxe/HttpBootDhcp6.c > create mode 100644 NetworkPkg/HttpBootDxe/HttpBootDhcp6.h > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://listsedk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel