ShellPkg: Add check logic for the gateway validity.
if we set a static IP using command 'ifconfig -s eth0 static 192.168.0.121 255.255.255.0 0.0.0.0' The system says 'Failed to set address.' but using 'ifconfig -l', the static IP can be assigned successfully. so we need to check the gateway validity before setting manual address to keep the ifconfig -s command more consistent. Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Santhapur Naveen <naveens@amiindia.co.in> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
// /**
|
||||
//
|
||||
// (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
// Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved. <BR>
|
||||
// Copyright (c) 2010 - 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
|
||||
@ -66,6 +66,7 @@
|
||||
#string STR_IFCONFIG_LACK_COMMAND #language en-US "Lack interface config option.\n"
|
||||
#string STR_IFCONFIG_INVALID_INTERFACE #language en-US "Invalid interface name.\n"
|
||||
#string STR_IFCONFIG_INVALID_IPADDRESS #language en-US "Invalid ipv4 address: '%H%s%N'\n"
|
||||
#string STR_IFCONFIG_INVALID_GATEWAY #language en-US "Invalid gateway address: '%H%s%N'\n"
|
||||
#string STR_IFCONFIG_DUPLICATE_COMMAND #language en-US "Duplicate commands. Bad command %H%s%N is skipped.\n"
|
||||
#string STR_IFCONFIG_CONFLICT_COMMAND #language en-US "Conflict commands. Bad command %H%s%N is skipped.\n"
|
||||
#string STR_IFCONFIG_UNKNOWN_COMMAND #language en-US "Unknown commands. Bad command %H%s%N is skipped.\n"
|
||||
|
Reference in New Issue
Block a user