Commit a65d1410 authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

s390/qeth: recognize non-IP multicast on L3 transmit

When
1. an skb has no neighbour, and
2. skb->protocol is not IP[V6],

we select the skb's cast type based on its destination MAC address.

The multicast check is currently restricted to Multicast IP-mapped MACs.
Extend it to also cover non-IP Multicast MACs.
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1f979123
...@@ -505,9 +505,6 @@ struct qeth_qdio_info { ...@@ -505,9 +505,6 @@ struct qeth_qdio_info {
int default_out_queue; int default_out_queue;
}; };
#define QETH_ETH_MAC_V4 0x0100 /* like v4 */
#define QETH_ETH_MAC_V6 0x3333 /* like v6 */
/** /**
* buffer stuff for read channel * buffer stuff for read channel
*/ */
......
...@@ -2353,7 +2353,6 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2353,7 +2353,6 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
static int qeth_l3_get_cast_type(struct sk_buff *skb) static int qeth_l3_get_cast_type(struct sk_buff *skb)
{ {
u16 hdr_mac = *((u16 *)skb->data);
struct neighbour *n = NULL; struct neighbour *n = NULL;
struct dst_entry *dst; struct dst_entry *dst;
...@@ -2385,7 +2384,7 @@ static int qeth_l3_get_cast_type(struct sk_buff *skb) ...@@ -2385,7 +2384,7 @@ static int qeth_l3_get_cast_type(struct sk_buff *skb)
/* ... and MAC address */ /* ... and MAC address */
if (ether_addr_equal_64bits(eth_hdr(skb)->h_dest, skb->dev->broadcast)) if (ether_addr_equal_64bits(eth_hdr(skb)->h_dest, skb->dev->broadcast))
return RTN_BROADCAST; return RTN_BROADCAST;
if (hdr_mac == QETH_ETH_MAC_V4 || hdr_mac == QETH_ETH_MAC_V6) if (is_multicast_ether_addr(eth_hdr(skb)->h_dest))
return RTN_MULTICAST; return RTN_MULTICAST;
/* default to unicast */ /* default to unicast */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment