|
|
9ae3a8 |
From d16828fb1034ceb05e3e690065aa1ddc2088d53c Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Dmitry Fleytman <dfleytma@redhat.com>
|
|
|
9ae3a8 |
Date: Tue, 19 Nov 2013 13:18:27 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 03/14] virtio-net: broken RX filtering logic fixed
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Dmitry Fleytman <dfleytma@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1384867107-25295-1-git-send-email-dfleytma@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 55756
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH] virtio-net: broken RX filtering logic fixed
|
|
|
9ae3a8 |
Bugzilla: 1029370
|
|
|
9ae3a8 |
RH-Acked-by: Yan Vugenfirer <yvugenfi@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Vlad Yasevich <vyasevic@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Amos Kong <akong@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1029370
|
|
|
9ae3a8 |
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=6606668
|
|
|
9ae3a8 |
Upstream-status: cc386e96727442f5b67052d4e0a602f6f652ffe6
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Upon processing of VIRTIO_NET_CTRL_MAC_TABLE_SET command
|
|
|
9ae3a8 |
multicast list overwrites unicast list in mac_table.
|
|
|
9ae3a8 |
This leads to broken logic for both unicast and multicast RX filtering.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/net/virtio-net.c | 3 ++-
|
|
|
9ae3a8 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/net/virtio-net.c | 3 ++-
|
|
|
9ae3a8 |
1 files changed, 2 insertions(+), 1 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
|
|
|
9ae3a8 |
index f889841..3bc1eed 100644
|
|
|
9ae3a8 |
--- a/hw/net/virtio-net.c
|
|
|
9ae3a8 |
+++ b/hw/net/virtio-net.c
|
|
|
9ae3a8 |
@@ -595,7 +595,8 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd,
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if (n->mac_table.in_use + mac_data.entries <= MAC_TABLE_ENTRIES) {
|
|
|
9ae3a8 |
- s = iov_to_buf(iov, iov_cnt, 0, n->mac_table.macs,
|
|
|
9ae3a8 |
+ s = iov_to_buf(iov, iov_cnt, 0,
|
|
|
9ae3a8 |
+ &n->mac_table.macs[n->mac_table.in_use * ETH_ALEN],
|
|
|
9ae3a8 |
mac_data.entries * ETH_ALEN);
|
|
|
9ae3a8 |
if (s != mac_data.entries * ETH_ALEN) {
|
|
|
9ae3a8 |
goto error;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|