Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368671
b: refs/heads/master
c: 18406d7
h: refs/heads/master
i:
  368669: 5bc0519
  368667: 7ef9362
  368663: aab5e28
  368655: b3f968c
  368639: ff4a465
v: v3
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Mar 26, 2013
1 parent e617ec6 commit f563e24
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8092861efd827deb8d84292674704ee8bf41b04
refs/heads/master: 18406d7e42a67d7b3a3b3ed17be6626a51d8c715
21 changes: 19 additions & 2 deletions trunk/drivers/firewire/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,14 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
int status;
__be64 guid;

switch (ether_type) {
case ETH_P_ARP:
case ETH_P_IP:
break;
default:
goto err;
}

dev = netdev_priv(net);
/* Write metadata, and then pass to the receive level */
skb->dev = net;
Expand Down Expand Up @@ -653,6 +661,7 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
return 0;

no_peer:
err:
net->stats.rx_errors++;
net->stats.rx_dropped++;

Expand Down Expand Up @@ -1340,9 +1349,17 @@ static netdev_tx_t fwnet_tx(struct sk_buff *skb, struct net_device *net)
* We might need to rebuild the header on tx failure.
*/
memcpy(&hdr_buf, skb->data, sizeof(hdr_buf));
skb_pull(skb, sizeof(hdr_buf));

proto = hdr_buf.h_proto;

switch (proto) {
case htons(ETH_P_ARP):
case htons(ETH_P_IP):
break;
default:
goto fail;
}

skb_pull(skb, sizeof(hdr_buf));
dg_size = skb->len;

/*
Expand Down

0 comments on commit f563e24

Please sign in to comment.