summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-29 13:15:13 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-29 13:15:13 -0700
commit9415fddd99e12d57640774a3043a809140245c40 (patch)
treebaafe3ad88c33b853acd81cff3745d45c2a26c2e /include
parent297640e89ea21e314bdda45468e5f78c978dae16 (diff)
parentc01003c20563d1e75ec9828d21743919d2b43977 (diff)
downloadlinux-stable-9415fddd99e12d57640774a3043a809140245c40.tar.gz
linux-stable-9415fddd99e12d57640774a3043a809140245c40.tar.bz2
linux-stable-9415fddd99e12d57640774a3043a809140245c40.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IFB]: Fix crash on input device removal [BNX2]: Fix link interrupt problem.
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h5
-rw-r--r--include/net/pkt_cls.h7
2 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 4ff3940210d8..82f43ad478c7 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -188,7 +188,7 @@ enum {
* @sk: Socket we are owned by
* @tstamp: Time we arrived
* @dev: Device we arrived on/are leaving by
- * @input_dev: Device we arrived on
+ * @iif: ifindex of device we arrived on
* @h: Transport layer header
* @nh: Network layer header
* @mac: Link layer header
@@ -235,7 +235,8 @@ struct sk_buff {
struct sock *sk;
struct skb_timeval tstamp;
struct net_device *dev;
- struct net_device *input_dev;
+ int iif;
+ /* 4 byte hole on 64 bit*/
union {
struct tcphdr *th;
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index b902d24a3256..02647fe3d74b 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -352,10 +352,13 @@ tcf_change_indev(struct tcf_proto *tp, char *indev, struct rtattr *indev_tlv)
static inline int
tcf_match_indev(struct sk_buff *skb, char *indev)
{
+ struct net_device *dev;
+
if (indev[0]) {
- if (!skb->input_dev)
+ if (!skb->iif)
return 0;
- if (strcmp(indev, skb->input_dev->name))
+ dev = __dev_get_by_index(skb->iif);
+ if (!dev || strcmp(indev, dev->name))
return 0;
}