summaryrefslogtreecommitdiff
path: root/meta-google
diff options
context:
space:
mode:
Diffstat (limited to 'meta-google')
-rw-r--r--meta-google/recipes-google/networking/network-sh/lib.sh4
-rwxr-xr-xmeta-google/recipes-google/networking/network-sh/test.sh2
2 files changed, 3 insertions, 3 deletions
diff --git a/meta-google/recipes-google/networking/network-sh/lib.sh b/meta-google/recipes-google/networking/network-sh/lib.sh
index b5d9382fcb..e4acc673b8 100644
--- a/meta-google/recipes-google/networking/network-sh/lib.sh
+++ b/meta-google/recipes-google/networking/network-sh/lib.sh
@@ -45,10 +45,10 @@ mac_to_eui64() {
mac_to_bytes mac_bytes "$1" || return
# Using EUI-64 conversion rules, create the suffix bytes from MAC bytes
- # Invert bit-0 of the first byte, and insert 0xfffe in the middle.
+ # Invert bit-1 of the first byte, and insert 0xfffe in the middle.
local suffix_bytes=(
0 0 0 0 0 0 0 0
- $((mac_bytes[0] ^ 1))
+ $((mac_bytes[0] ^ 2))
${mac_bytes[@]:1:2}
$((0xff)) $((0xfe))
${mac_bytes[@]:3:3}
diff --git a/meta-google/recipes-google/networking/network-sh/test.sh b/meta-google/recipes-google/networking/network-sh/test.sh
index 2803c09785..9596eef3e0 100755
--- a/meta-google/recipes-google/networking/network-sh/test.sh
+++ b/meta-google/recipes-google/networking/network-sh/test.sh
@@ -57,7 +57,7 @@ test_mac_to_eui48() {
test_mac_to_eui64() {
str="$(mac_to_eui64 '12:34:56:78:90:af')" || fail
- expect_streq "$str" '::1334:56ff:fe78:90af'
+ expect_streq "$str" '::1034:56ff:fe78:90af'
}
test_ip4_to_bytes() {