summaryrefslogtreecommitdiff
path: root/meta-google
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2022-03-02 03:27:20 +0300
committerWilliam A. Kennington III <wak@google.com>2022-03-07 20:53:51 +0300
commit882b78b52ceabb3a0b63de4006738d92c8c55360 (patch)
treef9dc20f316595befb9f3bb03ee9b8c77f3e001ed /meta-google
parent91da5203e3d406de0f8ddfb86dd99ef79959de3d (diff)
downloadopenbmc-882b78b52ceabb3a0b63de4006738d92c8c55360.tar.xz
meta-google: gbmc-ncsi-config: Restrict accepted hostnames
We only want to allow valid prod hostnames such as `jtyl0` or `fgh10` and not hostnames like `ovss`. Change-Id: I0acf9405ff331a06526a52fe1b410458b122893a Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'meta-google')
-rwxr-xr-xmeta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
index bd2f2becc9..6255f70858 100755
--- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
+++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
@@ -108,7 +108,7 @@ while true; do
pfx="$(ip_bytes_to_str t_pfx_b)"
(( t_pfx_b[9] &= 0xf0 ))
stateless_pfx="$(ip_bytes_to_str t_pfx_b)"
- elif [[ "$line" =~ ^'DNS search list'' '*:' '*([^.-]*)[^.]*[.](.*.google.com)$ ]]; then
+ elif [[ "$line" =~ ^'DNS search list'' '*:' '*([a-z]+[0-9]+)[^.]*[.](.*.google.com)$ ]]; then
host="${BASH_REMATCH[1]}"
domain="${BASH_REMATCH[2]}"
elif [[ "$line" =~ ^from' '(.*)$ ]]; then