Commit 28692ec4 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller

qeth: discard inbound packets with unknown header id

Debugging statements are added for inbound packets with unknown
header id. Those packets are discarded and no longer processed as
osn-packets.
Signed-off-by: default avatarUrsula Braun <braunu@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 59579da3
...@@ -2702,10 +2702,15 @@ qeth_process_inbound_buffer(struct qeth_card *card, ...@@ -2702,10 +2702,15 @@ qeth_process_inbound_buffer(struct qeth_card *card,
qeth_layer2_rebuild_skb(card, skb, hdr); qeth_layer2_rebuild_skb(card, skb, hdr);
else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3)
vlan_tag = qeth_rebuild_skb(card, skb, hdr); vlan_tag = qeth_rebuild_skb(card, skb, hdr);
else { /*in case of OSN*/ else if (hdr->hdr.osn.id == QETH_HEADER_TYPE_OSN) {
skb_push(skb, sizeof(struct qeth_hdr)); skb_push(skb, sizeof(struct qeth_hdr));
skb_copy_to_linear_data(skb, hdr, skb_copy_to_linear_data(skb, hdr,
sizeof(struct qeth_hdr)); sizeof(struct qeth_hdr));
} else { /* unknown header type */
dev_kfree_skb_any(skb);
QETH_DBF_TEXT(trace, 3, "inbunkno");
QETH_DBF_HEX(control, 3, hdr, QETH_DBF_CONTROL_LEN);
continue;
} }
/* is device UP ? */ /* is device UP ? */
if (!(card->dev->flags & IFF_UP)){ if (!(card->dev->flags & IFF_UP)){
......
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