git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
net
/
irda
/
irlan
/
irlan_eth.c
diff --git
a/net/irda/irlan/irlan_eth.c
b/net/irda/irlan/irlan_eth.c
index
04bb892
..
953e255
100644
(file)
--- a/
net/irda/irlan/irlan_eth.c
+++ b/
net/irda/irlan/irlan_eth.c
@@
-222,7
+222,13
@@
int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb)
++self->stats.rx_dropped;
return 0;
}
++self->stats.rx_dropped;
return 0;
}
- ASSERT(skb->len > 1, return 0;);
+ if (skb->len < ETH_HLEN) {
+ IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n",
+ __FUNCTION__, skb->len);
+ ++self->stats.rx_dropped;
+ dev_kfree_skb(skb);
+ return 0;
+ }
/*
* Adopt this frame! Important to set all these fields since they
/*
* Adopt this frame! Important to set all these fields since they
@@
-261,12
+267,12
@@
void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
self = (struct irlan_cb *) instance;
self = (struct irlan_cb *) instance;
- ASSERT(self != NULL, return;);
- ASSERT(self->magic == IRLAN_MAGIC, return;);
+
IRDA_
ASSERT(self != NULL, return;);
+
IRDA_
ASSERT(self->magic == IRLAN_MAGIC, return;);
dev = self->dev;
dev = self->dev;
- ASSERT(dev != NULL, return;);
+
IRDA_
ASSERT(dev != NULL, return;);
IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __FUNCTION__,
flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START",
IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __FUNCTION__,
flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START",
@@
-304,7
+310,7
@@
void irlan_eth_send_gratuitous_arp(struct net_device *dev)
#ifdef CONFIG_INET
IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n");
rcu_read_lock();
#ifdef CONFIG_INET
IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n");
rcu_read_lock();
- in_dev = __in_dev_get(dev);
+ in_dev = __in_dev_get
_rcu
(dev);
if (in_dev == NULL)
goto out;
if (in_dev->ifa_list)
if (in_dev == NULL)
goto out;
if (in_dev->ifa_list)
@@
-340,7
+346,7
@@
static void irlan_eth_set_multicast_list(struct net_device *dev)
if (dev->flags & IFF_PROMISC) {
/* Enable promiscuous mode */
if (dev->flags & IFF_PROMISC) {
/* Enable promiscuous mode */
- WARNING("Promiscous mode not implemented by IrLAN!\n");
+
IRDA_
WARNING("Promiscous mode not implemented by IrLAN!\n");
}
else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
/* Disable promiscuous mode, use normal mode. */
}
else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
/* Disable promiscuous mode, use normal mode. */