diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2012-06-10 23:18:44 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2012-09-07 17:35:34 +0200 |
commit | 449bc90e1f2e2fbafb64eb0c76d16c9352b0d2df (patch) | |
tree | be366550b4e929343f1c68c670bf41fcf0be115c /hw/lan9118.c | |
parent | 7e9c7ffe9fd9dfc3d0168dd584936db8144b230b (diff) | |
download | qemu-449bc90e1f2e2fbafb64eb0c76d16c9352b0d2df.zip qemu-449bc90e1f2e2fbafb64eb0c76d16c9352b0d2df.tar.gz qemu-449bc90e1f2e2fbafb64eb0c76d16c9352b0d2df.tar.bz2 |
lan9118: fix multicast filtering
The lan9118 emulation tries to compute the multicast index by calling
directly the crc32() function from zlib, but fails to get the correct
result.
Use the common compute_mcast_idx() function instead, which gives the
correct result. This fixes IPv6 support.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/lan9118.c')
-rw-r--r-- | hw/lan9118.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/lan9118.c b/hw/lan9118.c index ff0a50b..ceaf96f 100644 --- a/hw/lan9118.c +++ b/hw/lan9118.c @@ -500,7 +500,7 @@ static int lan9118_filter(lan9118_state *s, const uint8_t *addr) } } else { /* Hash matching */ - hash = (crc32(~0, addr, 6) >> 26); + hash = compute_mcast_idx(addr); if (hash & 0x20) { return (s->mac_hashh >> (hash & 0x1f)) & 1; } else { |