aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2026-08-11 19:00:51 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2026-08-11 20:59:32 +0000
commita86d65b2c99bab3fe46389b3b51ad27956dccfe9 (patch)
tree2b92c3d0f5823e03017770e64d152278f4c3d1f1
parenta09034d561cbb3792ecc0146b41d4794ab3bda37 (diff)
e1000: Avoid a signed multicast bitmap shift
The multicast hash bit can be 31. Use an unsigned value so setting the bit cannot shift a signed integer into its sign bit. MFC after: 2 weeks
-rw-r--r--sys/dev/e1000/e1000_mac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/e1000/e1000_mac.c b/sys/dev/e1000/e1000_mac.c
index eb2c29d153dc..46e91773c126 100644
--- a/sys/dev/e1000/e1000_mac.c
+++ b/sys/dev/e1000/e1000_mac.c
@@ -611,7 +611,7 @@ void e1000_update_mc_addr_list_generic(struct e1000_hw *hw,
hash_reg = (hash_value >> 5) & (hw->mac.mta_reg_count - 1);
hash_bit = hash_value & 0x1F;
- hw->mac.mta_shadow[hash_reg] |= (1 << hash_bit);
+ hw->mac.mta_shadow[hash_reg] |= 1U << hash_bit;
mc_addr_list += (ETHER_ADDR_LEN);
}