]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.7/s390-qeth-fix-thinko-in-ipv4-multicast-address-tracking.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.14.7 / s390-qeth-fix-thinko-in-ipv4-multicast-address-tracking.patch
1 From foo@baz Thu Dec 14 11:45:40 CET 2017
2 From: Julian Wiedmann <jwi@linux.vnet.ibm.com>
3 Date: Fri, 1 Dec 2017 10:14:49 +0100
4 Subject: s390/qeth: fix thinko in IPv4 multicast address tracking
5
6 From: Julian Wiedmann <jwi@linux.vnet.ibm.com>
7
8
9 [ Upsteam commit bc3ab70584696cb798b9e1e0ac8e6ced5fd4c3b8 ]
10
11 Commit 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback")
12 reworked how secondary addresses are managed for qeth devices.
13 Instead of dropping & subsequently re-adding all addresses on every
14 ndo_set_rx_mode() call, qeth now keeps track of the addresses that are
15 currently registered with the HW.
16 On a ndo_set_rx_mode(), we thus only need to do (de-)registration
17 requests for the addresses that have actually changed.
18
19 On L3 devices, the lookup for IPv4 Multicast addresses checks the wrong
20 hashtable - and thus never finds a match. As a result, we first delete
21 *all* such addresses, and then re-add them again. So each set_rx_mode()
22 causes a short period where the IPv4 Multicast addresses are not
23 registered, and the card stops forwarding inbound traffic for them.
24
25 Fix this by setting the ->is_multicast flag on the lookup object, thus
26 enabling qeth_l3_ip_from_hash() to search the correct hashtable and
27 find a match there.
28
29 Fixes: 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback")
30 Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
31 Signed-off-by: David S. Miller <davem@davemloft.net>
32 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33 ---
34 drivers/s390/net/qeth_l3_main.c | 1 +
35 1 file changed, 1 insertion(+)
36
37 --- a/drivers/s390/net/qeth_l3_main.c
38 +++ b/drivers/s390/net/qeth_l3_main.c
39 @@ -1376,6 +1376,7 @@ qeth_l3_add_mc_to_hash(struct qeth_card
40
41 tmp->u.a4.addr = be32_to_cpu(im4->multiaddr);
42 memcpy(tmp->mac, buf, sizeof(tmp->mac));
43 + tmp->is_multicast = 1;
44
45 ipm = qeth_l3_ip_from_hash(card, tmp);
46 if (ipm) {