From 2e2ddaf600bc0d205b00001a4e315ab1531fd63f Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Tue, 18 Jul 2017 20:34:04 +0000 Subject: [PATCH] *** Temp workaround for MLNX mac truncating bug --- syncd/scripts/syncd_init_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncd/scripts/syncd_init_common.sh b/syncd/scripts/syncd_init_common.sh index 46aecbada316..0bdaf7563f32 100755 --- a/syncd/scripts/syncd_init_common.sh +++ b/syncd/scripts/syncd_init_common.sh @@ -52,7 +52,7 @@ config_syncd_mlnx() # Read MAC address and align the last 6 bits. MAC_ADDRESS=$(ip link show eth0 | grep ether | awk '{print $2}') last_byte=$(python -c "print '$MAC_ADDRESS'[-2:]") - aligned_last_byte=$(python -c "print format(int(int('$last_byte', 16) & 0b11000000), '02x')") # put mask and take away the 0x prefix + aligned_last_byte=$(python -c "print format(int(int('$last_byte', 16) & 0b00000000), '02x')") # put mask and take away the 0x prefix ALIGNED_MAC_ADDRESS=$(python -c "print '$MAC_ADDRESS'[:-2] + '$aligned_last_byte'") # put aligned byte into the end of MAC # Write MAC address into /tmp/profile file.