From 2c49d714b5361d3c0af27a00e7f3d42a6994b733 Mon Sep 17 00:00:00 2001 From: Harikrishna Date: Wed, 6 Jul 2022 09:20:13 +0530 Subject: [PATCH] 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 65f04c48d57..8ca6cc77baa 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"