Fix missing IP of alias interface

The ifup-aliases script assumes that the IPv4 address is always
defined. If the configuration is only for IPv6, the script would
generate an error and not process the IPv6 address of the interface.
This commit is to bring up the IPv6 interface even if the IPv4 address
is not defined.

Partial-Bug: 1834234

Change-Id: Ib0c4cbc7ec19cc0c0c485e4ad63c380aa8a49a4c
Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
This commit is contained in:
Teresa Ho 2019-09-30 08:26:19 -04:00
parent 5f72ddb26a
commit caac6ebf35
4 changed files with 59 additions and 1 deletions

View File

@ -1 +1 @@
TIS_PATCH_VER=18
TIS_PATCH_VER=19

View File

@ -3,3 +3,4 @@ stop-creating-shared-dirs.patch
fix-build-failures-due-to-unwanted-sgid.patch
0001-Update-package-versioning-for-TIS-format.patch
ifup-alias-scope.patch
added-ifup-alias-check-ipaddr.patch

View File

@ -0,0 +1,32 @@
From 7f65521a9cee14ecd136f4caf44409b2acc86bdd Mon Sep 17 00:00:00 2001
From: Teresa Ho <teresa.ho@windriver.com>
Date: Wed, 25 Sep 2019 16:19:26 -0400
Subject: [PATCH 1/1] Added ifup-alias-check-ipaddr.patch
---
SPECS/initscripts.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/initscripts.spec b/SPECS/initscripts.spec
index fc7115c..9309d03 100644
--- a/SPECS/initscripts.spec
+++ b/SPECS/initscripts.spec
@@ -49,6 +49,7 @@ Patch10: ipv6-static-route-support.patch
Patch11: ifup-eth-stop-waiting-if-link-is-up.patch
Patch12: run-dhclient-as-daemon-for-ipv6.patch
Patch13: ifup-alias-scope.patch
+Patch14: ifup-alias-check-ipaddr.patch
%description
The initscripts package contains basic system scripts used
@@ -82,6 +83,7 @@ Currently, this consists of various memory checking code.
%patch11 -p1
%patch12 -p1
%patch13 -p1
+%patch14 -p1
%build
make
--
1.8.3.1

View File

@ -0,0 +1,25 @@
From a45766732beaa475d48907824666e501bacc69db Mon Sep 17 00:00:00 2001
From: Teresa Ho <teresa.ho@windriver.com>
Date: Wed, 25 Sep 2019 15:56:36 -0400
Subject: [PATCH 1/1] Patch14: ifup-alias-check-ipaddr
---
sysconfig/network-scripts/ifup-aliases | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index 9086763..40454ed 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -175,7 +175,7 @@ function new_interface ()
ipseen_${IPGLOP}=$FILE; devseen_${DEVNUM}=$FILE;
";
- if [ -n "$ipseen" ]; then
+ if [ -n "$IPADDR" -a -n "$ipseen" ]; then
net_log $"error in $FILE: already seen ipaddr $IPADDR in $ipseen"
return 1
fi
--
1.8.3.1