diff options
author | David S. Miller <davem@davemloft.net> | 2005-08-09 22:34:12 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:32:25 -0400 |
commit | f2ccd8fa06c8e302116e71df372f5c1f83432e03 (patch) | |
tree | 6e933f4bdc8899009edb33642b908779f123fb4a /net | |
parent | b6b99eb5409d75ae35390057cd28f3aedfbd4cf4 (diff) |
[NET]: Kill skb->real_dev
Bonding just wants the device before the skb_bond()
decapsulation occurs, so simply pass that original
device into packet_type->func() as an argument.
It remains to be seen whether we can use this same
exact thing to get rid of skb->input_dev as well.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/802/p8022.c | 3 | ||||
-rw-r--r-- | net/802/psnap.c | 7 | ||||
-rw-r--r-- | net/8021q/vlan.h | 2 | ||||
-rw-r--r-- | net/8021q/vlan_dev.c | 2 | ||||
-rw-r--r-- | net/appletalk/aarp.c | 2 | ||||
-rw-r--r-- | net/appletalk/ddp.c | 6 | ||||
-rw-r--r-- | net/ax25/ax25_in.c | 8 | ||||
-rw-r--r-- | net/core/dev.c | 35 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 | ||||
-rw-r--r-- | net/decnet/af_decnet.c | 2 | ||||
-rw-r--r-- | net/decnet/dn_route.c | 2 | ||||
-rw-r--r-- | net/econet/af_econet.c | 2 | ||||
-rw-r--r-- | net/ipv4/arp.c | 4 | ||||
-rw-r--r-- | net/ipv4/ip_input.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipconfig.c | 8 | ||||
-rw-r--r-- | net/ipv6/ip6_input.c | 2 | ||||
-rw-r--r-- | net/ipx/af_ipx.c | 2 | ||||
-rw-r--r-- | net/irda/irlap_frame.c | 2 | ||||
-rw-r--r-- | net/irda/irmod.c | 2 | ||||
-rw-r--r-- | net/llc/llc_core.c | 3 | ||||
-rw-r--r-- | net/llc/llc_input.c | 4 | ||||
-rw-r--r-- | net/netrom/nr_dev.c | 2 | ||||
-rw-r--r-- | net/packet/af_packet.c | 6 | ||||
-rw-r--r-- | net/x25/x25_dev.c | 2 |
24 files changed, 58 insertions, 54 deletions
diff --git a/net/802/p8022.c b/net/802/p8022.c index 5ae63416df6d..b24817c63ca8 100644 --- a/net/802/p8022.c +++ b/net/802/p8022.c | |||
@@ -35,7 +35,8 @@ static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb, | |||
35 | struct datalink_proto *register_8022_client(unsigned char type, | 35 | struct datalink_proto *register_8022_client(unsigned char type, |
36 | int (*func)(struct sk_buff *skb, | 36 | int (*func)(struct sk_buff *skb, |
37 | struct net_device *dev, | 37 | struct net_device *dev, |
38 | struct packet_type *pt)) | 38 | struct packet_type *pt, |
39 | struct net_device *orig_dev)) | ||
39 | { | 40 | { |
40 | struct datalink_proto *proto; | 41 | struct datalink_proto *proto; |
41 | 42 | ||
diff --git a/net/802/psnap.c b/net/802/psnap.c index 1053821ddf93..ab80b1fab53c 100644 --- a/net/802/psnap.c +++ b/net/802/psnap.c | |||
@@ -47,7 +47,7 @@ static struct datalink_proto *find_snap_client(unsigned char *desc) | |||
47 | * A SNAP packet has arrived | 47 | * A SNAP packet has arrived |
48 | */ | 48 | */ |
49 | static int snap_rcv(struct sk_buff *skb, struct net_device *dev, | 49 | static int snap_rcv(struct sk_buff *skb, struct net_device *dev, |
50 | struct packet_type *pt) | 50 | struct packet_type *pt, struct net_device *orig_dev) |
51 | { | 51 | { |
52 | int rc = 1; | 52 | int rc = 1; |
53 | struct datalink_proto *proto; | 53 | struct datalink_proto *proto; |
@@ -61,7 +61,7 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, | |||
61 | /* Pass the frame on. */ | 61 | /* Pass the frame on. */ |
62 | skb->h.raw += 5; | 62 | skb->h.raw += 5; |
63 | skb_pull(skb, 5); | 63 | skb_pull(skb, 5); |
64 | rc = proto->rcvfunc(skb, dev, &snap_packet_type); | 64 | rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); |
65 | } else { | 65 | } else { |
66 | skb->sk = NULL; | 66 | skb->sk = NULL; |
67 | kfree_skb(skb); | 67 | kfree_skb(skb); |
@@ -118,7 +118,8 @@ module_exit(snap_exit); | |||
118 | struct datalink_proto *register_snap_client(unsigned char *desc, | 118 | struct datalink_proto *register_snap_client(unsigned char *desc, |
119 | int (*rcvfunc)(struct sk_buff *, | 119 | int (*rcvfunc)(struct sk_buff *, |
120 | struct net_device *, | 120 | struct net_device *, |
121 | struct packet_type *)) | 121 | struct packet_type *, |
122 | struct net_device *)) | ||
122 | { | 123 | { |
123 | struct datalink_proto *proto = NULL; | 124 | struct datalink_proto *proto = NULL; |
124 | 125 | ||
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h index 508b1fa14546..9ae3a14dd016 100644 --- a/net/8021q/vlan.h +++ b/net/8021q/vlan.h | |||
@@ -51,7 +51,7 @@ struct net_device *__find_vlan_dev(struct net_device* real_dev, | |||
51 | /* found in vlan_dev.c */ | 51 | /* found in vlan_dev.c */ |
52 | int vlan_dev_rebuild_header(struct sk_buff *skb); | 52 | int vlan_dev_rebuild_header(struct sk_buff *skb); |
53 | int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, | 53 | int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, |
54 | struct packet_type* ptype); | 54 | struct packet_type *ptype, struct net_device *orig_dev); |
55 | int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 55 | int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
56 | unsigned short type, void *daddr, void *saddr, | 56 | unsigned short type, void *daddr, void *saddr, |
57 | unsigned len); | 57 | unsigned len); |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 49c487413518..145f5cde96cf 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -113,7 +113,7 @@ static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb) | |||
113 | * | 113 | * |
114 | */ | 114 | */ |
115 | int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, | 115 | int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, |
116 | struct packet_type* ptype) | 116 | struct packet_type* ptype, struct net_device *orig_dev) |
117 | { | 117 | { |
118 | unsigned char *rawp = NULL; | 118 | unsigned char *rawp = NULL; |
119 | struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data); | 119 | struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data); |
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index c34614ea5fce..7076097debc2 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -698,7 +698,7 @@ static void __aarp_resolved(struct aarp_entry **list, struct aarp_entry *a, | |||
698 | * frame. We currently only support Ethernet. | 698 | * frame. We currently only support Ethernet. |
699 | */ | 699 | */ |
700 | static int aarp_rcv(struct sk_buff *skb, struct net_device *dev, | 700 | static int aarp_rcv(struct sk_buff *skb, struct net_device *dev, |
701 | struct packet_type *pt) | 701 | struct packet_type *pt, struct net_device *orig_dev) |
702 | { | 702 | { |
703 | struct elapaarp *ea = aarp_hdr(skb); | 703 | struct elapaarp *ea = aarp_hdr(skb); |
704 | int hash, ret = 0; | 704 | int hash, ret = 0; |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 192b529f86a4..ffde33cd09ba 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -1390,7 +1390,7 @@ free_it: | |||
1390 | * [ie ARPHRD_ETHERTALK] | 1390 | * [ie ARPHRD_ETHERTALK] |
1391 | */ | 1391 | */ |
1392 | static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, | 1392 | static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, |
1393 | struct packet_type *pt) | 1393 | struct packet_type *pt, struct net_device *orig_dev) |
1394 | { | 1394 | { |
1395 | struct ddpehdr *ddp; | 1395 | struct ddpehdr *ddp; |
1396 | struct sock *sock; | 1396 | struct sock *sock; |
@@ -1482,7 +1482,7 @@ freeit: | |||
1482 | * header and append a long one. | 1482 | * header and append a long one. |
1483 | */ | 1483 | */ |
1484 | static int ltalk_rcv(struct sk_buff *skb, struct net_device *dev, | 1484 | static int ltalk_rcv(struct sk_buff *skb, struct net_device *dev, |
1485 | struct packet_type *pt) | 1485 | struct packet_type *pt, struct net_device *orig_dev) |
1486 | { | 1486 | { |
1487 | /* Expand any short form frames */ | 1487 | /* Expand any short form frames */ |
1488 | if (skb->mac.raw[2] == 1) { | 1488 | if (skb->mac.raw[2] == 1) { |
@@ -1528,7 +1528,7 @@ static int ltalk_rcv(struct sk_buff *skb, struct net_device *dev, | |||
1528 | } | 1528 | } |
1529 | skb->h.raw = skb->data; | 1529 | skb->h.raw = skb->data; |
1530 | 1530 | ||
1531 | return atalk_rcv(skb, dev, pt); | 1531 | return atalk_rcv(skb, dev, pt, orig_dev); |
1532 | freeit: | 1532 | freeit: |
1533 | kfree_skb(skb); | 1533 | kfree_skb(skb); |
1534 | return 0; | 1534 | return 0; |
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c index 3dc808fde33f..124eec8216d7 100644 --- a/net/ax25/ax25_in.c +++ b/net/ax25/ax25_in.c | |||
@@ -132,7 +132,7 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb) | |||
132 | skb->dev = ax25->ax25_dev->dev; | 132 | skb->dev = ax25->ax25_dev->dev; |
133 | skb->pkt_type = PACKET_HOST; | 133 | skb->pkt_type = PACKET_HOST; |
134 | skb->protocol = htons(ETH_P_IP); | 134 | skb->protocol = htons(ETH_P_IP); |
135 | ip_rcv(skb, skb->dev, NULL); /* Wrong ptype */ | 135 | ip_rcv(skb, skb->dev, NULL, skb->dev); /* Wrong ptype */ |
136 | return 1; | 136 | return 1; |
137 | } | 137 | } |
138 | #endif | 138 | #endif |
@@ -258,7 +258,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
258 | skb->dev = dev; | 258 | skb->dev = dev; |
259 | skb->pkt_type = PACKET_HOST; | 259 | skb->pkt_type = PACKET_HOST; |
260 | skb->protocol = htons(ETH_P_IP); | 260 | skb->protocol = htons(ETH_P_IP); |
261 | ip_rcv(skb, dev, ptype); /* Note ptype here is the wrong one, fix me later */ | 261 | ip_rcv(skb, dev, ptype, dev); /* Note ptype here is the wrong one, fix me later */ |
262 | break; | 262 | break; |
263 | 263 | ||
264 | case AX25_P_ARP: | 264 | case AX25_P_ARP: |
@@ -268,7 +268,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
268 | skb->dev = dev; | 268 | skb->dev = dev; |
269 | skb->pkt_type = PACKET_HOST; | 269 | skb->pkt_type = PACKET_HOST; |
270 | skb->protocol = htons(ETH_P_ARP); | 270 | skb->protocol = htons(ETH_P_ARP); |
271 | arp_rcv(skb, dev, ptype); /* Note ptype here is wrong... */ | 271 | arp_rcv(skb, dev, ptype, dev); /* Note ptype here is wrong... */ |
272 | break; | 272 | break; |
273 | #endif | 273 | #endif |
274 | case AX25_P_TEXT: | 274 | case AX25_P_TEXT: |
@@ -454,7 +454,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
454 | * Receive an AX.25 frame via a SLIP interface. | 454 | * Receive an AX.25 frame via a SLIP interface. |
455 | */ | 455 | */ |
456 | int ax25_kiss_rcv(struct sk_buff *skb, struct net_device *dev, | 456 | int ax25_kiss_rcv(struct sk_buff *skb, struct net_device *dev, |
457 | struct packet_type *ptype) | 457 | struct packet_type *ptype, struct net_device *orig_dev) |
458 | { | 458 | { |
459 | skb->sk = NULL; /* Initially we don't know who it's for */ | 459 | skb->sk = NULL; /* Initially we don't know who it's for */ |
460 | skb->destructor = NULL; /* Who initializes this, dammit?! */ | 460 | skb->destructor = NULL; /* Who initializes this, dammit?! */ |
diff --git a/net/core/dev.c b/net/core/dev.c index faf59b02c4bf..e1cc162bf295 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1058,7 +1058,7 @@ void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) | |||
1058 | 1058 | ||
1059 | skb2->h.raw = skb2->nh.raw; | 1059 | skb2->h.raw = skb2->nh.raw; |
1060 | skb2->pkt_type = PACKET_OUTGOING; | 1060 | skb2->pkt_type = PACKET_OUTGOING; |
1061 | ptype->func(skb2, skb->dev, ptype); | 1061 | ptype->func(skb2, skb->dev, ptype, skb->dev); |
1062 | } | 1062 | } |
1063 | } | 1063 | } |
1064 | rcu_read_unlock(); | 1064 | rcu_read_unlock(); |
@@ -1425,14 +1425,14 @@ int netif_rx_ni(struct sk_buff *skb) | |||
1425 | 1425 | ||
1426 | EXPORT_SYMBOL(netif_rx_ni); | 1426 | EXPORT_SYMBOL(netif_rx_ni); |
1427 | 1427 | ||
1428 | static __inline__ void skb_bond(struct sk_buff *skb) | 1428 | static inline struct net_device *skb_bond(struct sk_buff *skb) |
1429 | { | 1429 | { |
1430 | struct net_device *dev = skb->dev; | 1430 | struct net_device *dev = skb->dev; |
1431 | 1431 | ||
1432 | if (dev->master) { | 1432 | if (dev->master) |
1433 | skb->real_dev = skb->dev; | ||
1434 | skb->dev = dev->master; | 1433 | skb->dev = dev->master; |
1435 | } | 1434 | |
1435 | return dev; | ||
1436 | } | 1436 | } |
1437 | 1437 | ||
1438 | static void net_tx_action(struct softirq_action *h) | 1438 | static void net_tx_action(struct softirq_action *h) |
@@ -1482,10 +1482,11 @@ static void net_tx_action(struct softirq_action *h) | |||
1482 | } | 1482 | } |
1483 | 1483 | ||
1484 | static __inline__ int deliver_skb(struct sk_buff *skb, | 1484 | static __inline__ int deliver_skb(struct sk_buff *skb, |
1485 | struct packet_type *pt_prev) | 1485 | struct packet_type *pt_prev, |
1486 | struct net_device *orig_dev) | ||
1486 | { | 1487 | { |
1487 | atomic_inc(&skb->users); | 1488 | atomic_inc(&skb->users); |
1488 | return pt_prev->func(skb, skb->dev, pt_prev); | 1489 | return pt_prev->func(skb, skb->dev, pt_prev, orig_dev); |
1489 | } | 1490 | } |
1490 | 1491 | ||
1491 | #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE) | 1492 | #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE) |
@@ -1496,7 +1497,8 @@ struct net_bridge_fdb_entry *(*br_fdb_get_hook)(struct net_bridge *br, | |||
1496 | void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent); | 1497 | void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent); |
1497 | 1498 | ||
1498 | static __inline__ int handle_bridge(struct sk_buff **pskb, | 1499 | static __inline__ int handle_bridge(struct sk_buff **pskb, |
1499 | struct packet_type **pt_prev, int *ret) | 1500 | struct packet_type **pt_prev, int *ret, |
1501 | struct net_device *orig_dev) | ||
1500 | { | 1502 | { |
1501 | struct net_bridge_port *port; | 1503 | struct net_bridge_port *port; |
1502 | 1504 | ||
@@ -1505,14 +1507,14 @@ static __inline__ int handle_bridge(struct sk_buff **pskb, | |||
1505 | return 0; | 1507 | return 0; |
1506 | 1508 | ||
1507 | if (*pt_prev) { | 1509 | if (*pt_prev) { |
1508 | *ret = deliver_skb(*pskb, *pt_prev); | 1510 | *ret = deliver_skb(*pskb, *pt_prev, orig_dev); |
1509 | *pt_prev = NULL; | 1511 | *pt_prev = NULL; |
1510 | } | 1512 | } |
1511 | 1513 | ||
1512 | return br_handle_frame_hook(port, pskb); | 1514 | return br_handle_frame_hook(port, pskb); |
1513 | } | 1515 | } |
1514 | #else | 1516 | #else |
1515 | #define handle_bridge(skb, pt_prev, ret) (0) | 1517 | #define handle_bridge(skb, pt_prev, ret, orig_dev) (0) |
1516 | #endif | 1518 | #endif |
1517 | 1519 | ||
1518 | #ifdef CONFIG_NET_CLS_ACT | 1520 | #ifdef CONFIG_NET_CLS_ACT |
@@ -1559,6 +1561,7 @@ static int ing_filter(struct sk_buff *skb) | |||
1559 | int netif_receive_skb(struct sk_buff *skb) | 1561 | int netif_receive_skb(struct sk_buff *skb) |
1560 | { | 1562 | { |
1561 | struct packet_type *ptype, *pt_prev; | 1563 | struct packet_type *ptype, *pt_prev; |
1564 | struct net_device *orig_dev; | ||
1562 | int ret = NET_RX_DROP; | 1565 | int ret = NET_RX_DROP; |
1563 | unsigned short type; | 1566 | unsigned short type; |
1564 | 1567 | ||
@@ -1569,7 +1572,7 @@ int netif_receive_skb(struct sk_buff *skb) | |||
1569 | if (!skb->stamp.tv_sec) | 1572 | if (!skb->stamp.tv_sec) |
1570 | net_timestamp(&skb->stamp); | 1573 | net_timestamp(&skb->stamp); |
1571 | 1574 | ||
1572 | skb_bond(skb); | 1575 | orig_dev = skb_bond(skb); |
1573 | 1576 | ||
1574 | __get_cpu_var(netdev_rx_stat).total++; | 1577 | __get_cpu_var(netdev_rx_stat).total++; |
1575 | 1578 | ||
@@ -1590,14 +1593,14 @@ int netif_receive_skb(struct sk_buff *skb) | |||
1590 | list_for_each_entry_rcu(ptype, &ptype_all, list) { | 1593 | list_for_each_entry_rcu(ptype, &ptype_all, list) { |
1591 | if (!ptype->dev || ptype->dev == skb->dev) { | 1594 | if (!ptype->dev || ptype->dev == skb->dev) { |
1592 | if (pt_prev) | 1595 | if (pt_prev) |
1593 | ret = deliver_skb(skb, pt_prev); | 1596 | ret = deliver_skb(skb, pt_prev, orig_dev); |
1594 | pt_prev = ptype; | 1597 | pt_prev = ptype; |
1595 | } | 1598 | } |
1596 | } | 1599 | } |
1597 | 1600 | ||
1598 | #ifdef CONFIG_NET_CLS_ACT | 1601 | #ifdef CONFIG_NET_CLS_ACT |
1599 | if (pt_prev) { | 1602 | if (pt_prev) { |
1600 | ret = deliver_skb(skb, pt_prev); | 1603 | ret = deliver_skb(skb, pt_prev, orig_dev); |
1601 | pt_prev = NULL; /* noone else should process this after*/ | 1604 | pt_prev = NULL; /* noone else should process this after*/ |
1602 | } else { | 1605 | } else { |
1603 | skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); | 1606 | skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); |
@@ -1616,7 +1619,7 @@ ncls: | |||
1616 | 1619 | ||
1617 | handle_diverter(skb); | 1620 | handle_diverter(skb); |
1618 | 1621 | ||
1619 | if (handle_bridge(&skb, &pt_prev, &ret)) | 1622 | if (handle_bridge(&skb, &pt_prev, &ret, orig_dev)) |
1620 | goto out; | 1623 | goto out; |
1621 | 1624 | ||
1622 | type = skb->protocol; | 1625 | type = skb->protocol; |
@@ -1624,13 +1627,13 @@ ncls: | |||
1624 | if (ptype->type == type && | 1627 | if (ptype->type == type && |
1625 | (!ptype->dev || ptype->dev == skb->dev)) { | 1628 | (!ptype->dev || ptype->dev == skb->dev)) { |
1626 | if (pt_prev) | 1629 | if (pt_prev) |
1627 | ret = deliver_skb(skb, pt_prev); | 1630 | ret = deliver_skb(skb, pt_prev, orig_dev); |
1628 | pt_prev = ptype; | 1631 | pt_prev = ptype; |
1629 | } | 1632 | } |
1630 | } | 1633 | } |
1631 | 1634 | ||
1632 | if (pt_prev) { | 1635 | if (pt_prev) { |
1633 | ret = pt_prev->func(skb, skb->dev, pt_prev); | 1636 | ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev); |
1634 | } else { | 1637 | } else { |
1635 | kfree_skb(skb); | 1638 | kfree_skb(skb); |
1636 | /* Jamal, now you will not able to escape explaining | 1639 | /* Jamal, now you will not able to escape explaining |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 16df7bd77e78..ef498cb9f786 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -333,7 +333,6 @@ struct sk_buff *skb_clone(struct sk_buff *skb, unsigned int __nocast gfp_mask) | |||
333 | n->sk = NULL; | 333 | n->sk = NULL; |
334 | C(stamp); | 334 | C(stamp); |
335 | C(dev); | 335 | C(dev); |
336 | C(real_dev); | ||
337 | C(h); | 336 | C(h); |
338 | C(nh); | 337 | C(nh); |
339 | C(mac); | 338 | C(mac); |
@@ -397,7 +396,6 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) | |||
397 | 396 | ||
398 | new->sk = NULL; | 397 | new->sk = NULL; |
399 | new->dev = old->dev; | 398 | new->dev = old->dev; |
400 | new->real_dev = old->real_dev; | ||
401 | new->priority = old->priority; | 399 | new->priority = old->priority; |
402 | new->protocol = old->protocol; | 400 | new->protocol = old->protocol; |
403 | new->dst = dst_clone(old->dst); | 401 | new->dst = dst_clone(old->dst); |
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 0c30409fe9e5..bd49dd97a09c 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -2064,7 +2064,7 @@ static struct notifier_block dn_dev_notifier = { | |||
2064 | .notifier_call = dn_device_event, | 2064 | .notifier_call = dn_device_event, |
2065 | }; | 2065 | }; |
2066 | 2066 | ||
2067 | extern int dn_route_rcv(struct sk_buff *, struct net_device *, struct packet_type *); | 2067 | extern int dn_route_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); |
2068 | 2068 | ||
2069 | static struct packet_type dn_dix_packet_type = { | 2069 | static struct packet_type dn_dix_packet_type = { |
2070 | .type = __constant_htons(ETH_P_DNA_RT), | 2070 | .type = __constant_htons(ETH_P_DNA_RT), |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 2399fa8a3f86..2c915f305be3 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -572,7 +572,7 @@ static int dn_route_ptp_hello(struct sk_buff *skb) | |||
572 | return NET_RX_SUCCESS; | 572 | return NET_RX_SUCCESS; |
573 | } | 573 | } |
574 | 574 | ||
575 | int dn_route_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 575 | int dn_route_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
576 | { | 576 | { |
577 | struct dn_skb_cb *cb; | 577 | struct dn_skb_cb *cb; |
578 | unsigned char flags = 0; | 578 | unsigned char flags = 0; |
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index b807a314269e..8f0639905558 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c | |||
@@ -1009,7 +1009,7 @@ release: | |||
1009 | * Receive an Econet frame from a device. | 1009 | * Receive an Econet frame from a device. |
1010 | */ | 1010 | */ |
1011 | 1011 | ||
1012 | static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 1012 | static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
1013 | { | 1013 | { |
1014 | struct ec_framehdr *hdr; | 1014 | struct ec_framehdr *hdr; |
1015 | struct sock *sk; | 1015 | struct sock *sk; |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index a642fd612853..6eb9c549d643 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -700,7 +700,7 @@ void arp_send(int type, int ptype, u32 dest_ip, | |||
700 | static void parp_redo(struct sk_buff *skb) | 700 | static void parp_redo(struct sk_buff *skb) |
701 | { | 701 | { |
702 | nf_reset(skb); | 702 | nf_reset(skb); |
703 | arp_rcv(skb, skb->dev, NULL); | 703 | arp_rcv(skb, skb->dev, NULL, skb->dev); |
704 | } | 704 | } |
705 | 705 | ||
706 | /* | 706 | /* |
@@ -927,7 +927,7 @@ out: | |||
927 | * Receive an arp request from the device layer. | 927 | * Receive an arp request from the device layer. |
928 | */ | 928 | */ |
929 | 929 | ||
930 | int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 930 | int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
931 | { | 931 | { |
932 | struct arphdr *arp; | 932 | struct arphdr *arp; |
933 | 933 | ||
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index c703528e0bcd..d603247bdfe9 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -358,7 +358,7 @@ drop: | |||
358 | /* | 358 | /* |
359 | * Main IP Receive routine. | 359 | * Main IP Receive routine. |
360 | */ | 360 | */ |
361 | int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 361 | int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
362 | { | 362 | { |
363 | struct iphdr *iph; | 363 | struct iphdr *iph; |
364 | 364 | ||
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index d2bf8e1930a3..63e106605f28 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -393,7 +393,7 @@ static int __init ic_defaults(void) | |||
393 | 393 | ||
394 | #ifdef IPCONFIG_RARP | 394 | #ifdef IPCONFIG_RARP |
395 | 395 | ||
396 | static int ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt); | 396 | static int ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); |
397 | 397 | ||
398 | static struct packet_type rarp_packet_type __initdata = { | 398 | static struct packet_type rarp_packet_type __initdata = { |
399 | .type = __constant_htons(ETH_P_RARP), | 399 | .type = __constant_htons(ETH_P_RARP), |
@@ -414,7 +414,7 @@ static inline void ic_rarp_cleanup(void) | |||
414 | * Process received RARP packet. | 414 | * Process received RARP packet. |
415 | */ | 415 | */ |
416 | static int __init | 416 | static int __init |
417 | ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 417 | ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
418 | { | 418 | { |
419 | struct arphdr *rarp; | 419 | struct arphdr *rarp; |
420 | unsigned char *rarp_ptr; | 420 | unsigned char *rarp_ptr; |
@@ -555,7 +555,7 @@ struct bootp_pkt { /* BOOTP packet format */ | |||
555 | #define DHCPRELEASE 7 | 555 | #define DHCPRELEASE 7 |
556 | #define DHCPINFORM 8 | 556 | #define DHCPINFORM 8 |
557 | 557 | ||
558 | static int ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt); | 558 | static int ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); |
559 | 559 | ||
560 | static struct packet_type bootp_packet_type __initdata = { | 560 | static struct packet_type bootp_packet_type __initdata = { |
561 | .type = __constant_htons(ETH_P_IP), | 561 | .type = __constant_htons(ETH_P_IP), |
@@ -823,7 +823,7 @@ static void __init ic_do_bootp_ext(u8 *ext) | |||
823 | /* | 823 | /* |
824 | * Receive BOOTP reply. | 824 | * Receive BOOTP reply. |
825 | */ | 825 | */ |
826 | static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 826 | static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
827 | { | 827 | { |
828 | struct bootp_pkt *b; | 828 | struct bootp_pkt *b; |
829 | struct iphdr *h; | 829 | struct iphdr *h; |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 10fbb50daea4..ab51c0369e15 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -56,7 +56,7 @@ static inline int ip6_rcv_finish( struct sk_buff *skb) | |||
56 | return dst_input(skb); | 56 | return dst_input(skb); |
57 | } | 57 | } |
58 | 58 | ||
59 | int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 59 | int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
60 | { | 60 | { |
61 | struct ipv6hdr *hdr; | 61 | struct ipv6hdr *hdr; |
62 | u32 pkt_len; | 62 | u32 pkt_len; |
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index 5a27e5df5886..3a13c5d1d4d2 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c | |||
@@ -1627,7 +1627,7 @@ out: | |||
1627 | return rc; | 1627 | return rc; |
1628 | } | 1628 | } |
1629 | 1629 | ||
1630 | static int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 1630 | static int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
1631 | { | 1631 | { |
1632 | /* NULL here for pt means the packet was looped back */ | 1632 | /* NULL here for pt means the packet was looped back */ |
1633 | struct ipx_interface *intrfc; | 1633 | struct ipx_interface *intrfc; |
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index eb65b4925b51..3e9a06abbdd0 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
@@ -1303,7 +1303,7 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb, | |||
1303 | * Jean II | 1303 | * Jean II |
1304 | */ | 1304 | */ |
1305 | int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, | 1305 | int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, |
1306 | struct packet_type *ptype) | 1306 | struct packet_type *ptype, struct net_device *orig_dev) |
1307 | { | 1307 | { |
1308 | struct irlap_info info; | 1308 | struct irlap_info info; |
1309 | struct irlap_cb *self; | 1309 | struct irlap_cb *self; |
diff --git a/net/irda/irmod.c b/net/irda/irmod.c index 6ffaed4544e9..634901dd156f 100644 --- a/net/irda/irmod.c +++ b/net/irda/irmod.c | |||
@@ -54,7 +54,7 @@ extern int irsock_init(void); | |||
54 | extern void irsock_cleanup(void); | 54 | extern void irsock_cleanup(void); |
55 | /* irlap_frame.c */ | 55 | /* irlap_frame.c */ |
56 | extern int irlap_driver_rcv(struct sk_buff *, struct net_device *, | 56 | extern int irlap_driver_rcv(struct sk_buff *, struct net_device *, |
57 | struct packet_type *); | 57 | struct packet_type *, struct net_device *); |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Module parameters | 60 | * Module parameters |
diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c index 5ff02c080a0b..9727455bf0e7 100644 --- a/net/llc/llc_core.c +++ b/net/llc/llc_core.c | |||
@@ -103,7 +103,8 @@ out: | |||
103 | struct llc_sap *llc_sap_open(unsigned char lsap, | 103 | struct llc_sap *llc_sap_open(unsigned char lsap, |
104 | int (*func)(struct sk_buff *skb, | 104 | int (*func)(struct sk_buff *skb, |
105 | struct net_device *dev, | 105 | struct net_device *dev, |
106 | struct packet_type *pt)) | 106 | struct packet_type *pt, |
107 | struct net_device *orig_dev)) | ||
107 | { | 108 | { |
108 | struct llc_sap *sap = llc_sap_find(lsap); | 109 | struct llc_sap *sap = llc_sap_find(lsap); |
109 | 110 | ||
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index 4da6976efc9c..13b46240b7a1 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c | |||
@@ -132,7 +132,7 @@ static inline int llc_fixup_skb(struct sk_buff *skb) | |||
132 | * data now), it queues this frame in the connection's backlog. | 132 | * data now), it queues this frame in the connection's backlog. |
133 | */ | 133 | */ |
134 | int llc_rcv(struct sk_buff *skb, struct net_device *dev, | 134 | int llc_rcv(struct sk_buff *skb, struct net_device *dev, |
135 | struct packet_type *pt) | 135 | struct packet_type *pt, struct net_device *orig_dev) |
136 | { | 136 | { |
137 | struct llc_sap *sap; | 137 | struct llc_sap *sap; |
138 | struct llc_pdu_sn *pdu; | 138 | struct llc_pdu_sn *pdu; |
@@ -165,7 +165,7 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev, | |||
165 | * LLC functionality | 165 | * LLC functionality |
166 | */ | 166 | */ |
167 | if (sap->rcv_func) { | 167 | if (sap->rcv_func) { |
168 | sap->rcv_func(skb, dev, pt); | 168 | sap->rcv_func(skb, dev, pt, orig_dev); |
169 | goto out; | 169 | goto out; |
170 | } | 170 | } |
171 | dest = llc_pdu_type(skb); | 171 | dest = llc_pdu_type(skb); |
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c index 220bf7494f71..83eb41d9b937 100644 --- a/net/netrom/nr_dev.c +++ b/net/netrom/nr_dev.c | |||
@@ -64,7 +64,7 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev) | |||
64 | skb->nh.raw = skb->data; | 64 | skb->nh.raw = skb->data; |
65 | skb->pkt_type = PACKET_HOST; | 65 | skb->pkt_type = PACKET_HOST; |
66 | 66 | ||
67 | ip_rcv(skb, skb->dev, NULL); | 67 | ip_rcv(skb, skb->dev, NULL, skb->dev); |
68 | 68 | ||
69 | return 1; | 69 | return 1; |
70 | } | 70 | } |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index c9d5980aa4de..deb5f6f7f858 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -241,7 +241,7 @@ static struct proto_ops packet_ops; | |||
241 | #ifdef CONFIG_SOCK_PACKET | 241 | #ifdef CONFIG_SOCK_PACKET |
242 | static struct proto_ops packet_ops_spkt; | 242 | static struct proto_ops packet_ops_spkt; |
243 | 243 | ||
244 | static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 244 | static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
245 | { | 245 | { |
246 | struct sock *sk; | 246 | struct sock *sk; |
247 | struct sockaddr_pkt *spkt; | 247 | struct sockaddr_pkt *spkt; |
@@ -441,7 +441,7 @@ static inline unsigned run_filter(struct sk_buff *skb, struct sock *sk, unsigned | |||
441 | we will not harm anyone. | 441 | we will not harm anyone. |
442 | */ | 442 | */ |
443 | 443 | ||
444 | static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 444 | static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
445 | { | 445 | { |
446 | struct sock *sk; | 446 | struct sock *sk; |
447 | struct sockaddr_ll *sll; | 447 | struct sockaddr_ll *sll; |
@@ -546,7 +546,7 @@ drop: | |||
546 | } | 546 | } |
547 | 547 | ||
548 | #ifdef CONFIG_PACKET_MMAP | 548 | #ifdef CONFIG_PACKET_MMAP |
549 | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) | 549 | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
550 | { | 550 | { |
551 | struct sock *sk; | 551 | struct sock *sk; |
552 | struct packet_sock *po; | 552 | struct packet_sock *po; |
diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c index 36fc3bf6d882..adfe7b8df355 100644 --- a/net/x25/x25_dev.c +++ b/net/x25/x25_dev.c | |||
@@ -81,7 +81,7 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev, | 83 | int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev, |
84 | struct packet_type *ptype) | 84 | struct packet_type *ptype, struct net_device *orig_dev) |
85 | { | 85 | { |
86 | struct sk_buff *nskb; | 86 | struct sk_buff *nskb; |
87 | struct x25_neigh *nb; | 87 | struct x25_neigh *nb; |