public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch] NetworkPkg: Fix issue in dns driver when building DHCP packet.
@ 2017-05-04  9:35 Zhang Lubo
  2017-05-05  5:05 ` Wu, Jiaxin
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Lubo @ 2017-05-04  9:35 UTC (permalink / raw)
  To: edk2-devel; +Cc: Wu Jiaxin, Ye Ting, Fu Siyuan

Currently, DNS driver configure the dhcp message type to inform
when building dhcp packet to get dns info from, but it not works
with dhcp server deployed on linux system. However it works well
when changed to request type.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
---
 NetworkPkg/DnsDxe/DnsDhcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c
index c4add70..93779be 100644
--- a/NetworkPkg/DnsDxe/DnsDhcp.c
+++ b/NetworkPkg/DnsDxe/DnsDhcp.c
@@ -1,9 +1,9 @@
 /** @file
 Functions implementation related with DHCPv4/v6 for DNS driver.
 
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
 which accompanies this distribution.  The full text of the license may be found at
 http://opensource.org/licenses/bsd-license.php
 
@@ -460,11 +460,11 @@ GetDns4ServerFromDhcp4 (
     goto ON_EXIT;
   }
   
   ParaList[0]->OpCode  = DHCP4_TAG_TYPE;
   ParaList[0]->Length  = 1;
-  ParaList[0]->Data[0] = DHCP4_MSG_INFORM;
+  ParaList[0]->Data[0] = DHCP4_MSG_REQUEST;
   
   ParaList[1] = AllocateZeroPool (sizeof (EFI_DHCP4_PACKET_OPTION));
   if (ParaList[1] == NULL) {
     Status = EFI_OUT_OF_RESOURCES;
     goto ON_EXIT;
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] NetworkPkg: Fix issue in dns driver when building DHCP packet.
  2017-05-04  9:35 [patch] NetworkPkg: Fix issue in dns driver when building DHCP packet Zhang Lubo
@ 2017-05-05  5:05 ` Wu, Jiaxin
  0 siblings, 0 replies; 2+ messages in thread
From: Wu, Jiaxin @ 2017-05-05  5:05 UTC (permalink / raw)
  To: Zhang, Lubo, edk2-devel@lists.01.org; +Cc: Ye, Ting, Fu, Siyuan

Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>



> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Zhang Lubo
> Sent: Thursday, May 4, 2017 5:36 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>
> Subject: [edk2] [patch] NetworkPkg: Fix issue in dns driver when building DHCP
> packet.
> 
> Currently, DNS driver configure the dhcp message type to inform
> when building dhcp packet to get dns info from, but it not works
> with dhcp server deployed on linux system. However it works well
> when changed to request type.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
> Cc: Wu Jiaxin <jiaxin.wu@intel.com>
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> ---
>  NetworkPkg/DnsDxe/DnsDhcp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c
> index c4add70..93779be 100644
> --- a/NetworkPkg/DnsDxe/DnsDhcp.c
> +++ b/NetworkPkg/DnsDxe/DnsDhcp.c
> @@ -1,9 +1,9 @@
>  /** @file
>  Functions implementation related with DHCPv4/v6 for DNS driver.
> 
> -Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
>  This program and the accompanying materials
>  are licensed and made available under the terms and conditions of the BSD
> License
>  which accompanies this distribution.  The full text of the license may be found
> at
>  http://opensource.org/licenses/bsd-license.php
> 
> @@ -460,11 +460,11 @@ GetDns4ServerFromDhcp4 (
>      goto ON_EXIT;
>    }
> 
>    ParaList[0]->OpCode  = DHCP4_TAG_TYPE;
>    ParaList[0]->Length  = 1;
> -  ParaList[0]->Data[0] = DHCP4_MSG_INFORM;
> +  ParaList[0]->Data[0] = DHCP4_MSG_REQUEST;
> 
>    ParaList[1] = AllocateZeroPool (sizeof (EFI_DHCP4_PACKET_OPTION));
>    if (ParaList[1] == NULL) {
>      Status = EFI_OUT_OF_RESOURCES;
>      goto ON_EXIT;
> --
> 1.9.5.msysgit.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-05  5:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-04  9:35 [patch] NetworkPkg: Fix issue in dns driver when building DHCP packet Zhang Lubo
2017-05-05  5:05 ` Wu, Jiaxin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox