Skip to content

Commit

Permalink
qeth: discard inbound packets with unknown header id
Browse files Browse the repository at this point in the history
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: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Ursula Braun authored and David S. Miller committed Oct 10, 2007
1 parent 59579da commit 28692ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/s390/net/qeth_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2702,10 +2702,15 @@ qeth_process_inbound_buffer(struct qeth_card *card,
qeth_layer2_rebuild_skb(card, skb, hdr);
else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3)
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_copy_to_linear_data(skb, 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 ? */
if (!(card->dev->flags & IFF_UP)){
Expand Down

0 comments on commit 28692ec

Please sign in to comment.