You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2022/07/06 03:50:20 UTC

[cloudstack] branch 4.17 updated: scripts: Excluded fe80 or link local address in keystore setup (#6530)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.17 by this push:
     new 2c49d714b5 scripts: Excluded fe80 or link local address in keystore setup (#6530)
2c49d714b5 is described below

commit 2c49d714b5361d3c0af27a00e7f3d42a6994b733
Author: Harikrishna <ha...@gmail.com>
AuthorDate: Wed Jul 6 09:20:13 2022 +0530

    scripts: Excluded fe80 or link local address in keystore setup (#6530)
    
    This PR fixes the issue #6471 where in keystore setup does not exclude link-local addresses.
    
    We have fixed the keystore setup process to exclude the fe80 or link local addresses
---
 scripts/util/keystore-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/util/keystore-setup b/scripts/util/keystore-setup
index 65f04c48d5..8ca6cc77ba 100755
--- a/scripts/util/keystore-setup
+++ b/scripts/util/keystore-setup
@@ -44,7 +44,7 @@ keytool -genkey -storepass "$KS_PASS" -keypass "$KS_PASS" -alias "$ALIAS" -keyal
 
 # Generate CSR
 rm -f "$CSR_FILE"
-addresses=$(ip address | grep inet | awk '{print $2}' | sed 's/\/.*//g' | grep -v '^169.254.' | grep -v '^127.0.0.1' | grep -v '^::1' | sed 's/^/ip:/g' | tr '\r\n' ',')
+addresses=$(ip address | grep inet | awk '{print $2}' | sed 's/\/.*//g' | grep -v '^169.254.' | grep -v '^127.0.0.1' | egrep -v '^::1|^fe80' | grep -v '^::1' | sed 's/^/ip:/g' | tr '\r\n' ',')
 keytool -certreq -storepass "$KS_PASS" -alias "$ALIAS" -file $CSR_FILE -keystore "$KS_FILE" -ext san="$addresses" > /dev/null 2>&1
 cat "$CSR_FILE"