Skip to content

Commit

Permalink
*** Temp workaround for MLNX mac truncating bug
Browse files Browse the repository at this point in the history
  • Loading branch information
qiluo-msft committed Jul 18, 2017
1 parent 8cdcfd8 commit 2e2ddaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2e2ddaf

Please sign in to comment.