Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

David S. Miller and committed by
David S. Miller
f2ccd8fa b6b99eb5

+96 -91
+1 -1
drivers/block/aoe/aoenet.c
··· 120 120 * (1) len doesn't include the header by default. I want this. 121 121 */ 122 122 static int 123 - aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt) 123 + aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt, struct net_device *orig_dev) 124 124 { 125 125 struct aoe_hdr *h; 126 126 u32 n;
+4 -7
drivers/net/bonding/bond_3ad.c
··· 2419 2419 return 0; 2420 2420 } 2421 2421 2422 - int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype) 2422 + int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype, struct net_device *orig_dev) 2423 2423 { 2424 2424 struct bonding *bond = dev->priv; 2425 2425 struct slave *slave = NULL; 2426 2426 int ret = NET_RX_DROP; 2427 2427 2428 - if (!(dev->flags & IFF_MASTER)) { 2428 + if (!(dev->flags & IFF_MASTER)) 2429 2429 goto out; 2430 - } 2431 2430 2432 2431 read_lock(&bond->lock); 2433 - slave = bond_get_slave_by_dev((struct bonding *)dev->priv, 2434 - skb->real_dev); 2435 - if (slave == NULL) { 2432 + slave = bond_get_slave_by_dev((struct bonding *)dev->priv, orig_dev); 2433 + if (!slave) 2436 2434 goto out_unlock; 2437 - } 2438 2435 2439 2436 bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len); 2440 2437
+1 -1
drivers/net/bonding/bond_3ad.h
··· 295 295 void bond_3ad_handle_link_change(struct slave *slave, char link); 296 296 int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info); 297 297 int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev); 298 - int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype); 298 + int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype, struct net_device *orig_dev); 299 299 #endif //__BOND_3AD_H__ 300 300
+2 -3
drivers/net/bonding/bond_alb.c
··· 354 354 _unlock_rx_hashtbl(bond); 355 355 } 356 356 357 - static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct packet_type *ptype) 357 + static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct packet_type *ptype, struct net_device *orig_dev) 358 358 { 359 359 struct bonding *bond = bond_dev->priv; 360 360 struct arp_pkt *arp = (struct arp_pkt *)skb->data; 361 361 int res = NET_RX_DROP; 362 362 363 - if (!(bond_dev->flags & IFF_MASTER)) { 363 + if (!(bond_dev->flags & IFF_MASTER)) 364 364 goto out; 365 - } 366 365 367 366 if (!arp) { 368 367 dprintk("Packet has no ARP data\n");
+2 -2
drivers/net/hamradio/bpqether.c
··· 98 98 99 99 static char bpq_eth_addr[6]; 100 100 101 - static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *); 101 + static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); 102 102 static int bpq_device_event(struct notifier_block *, unsigned long, void *); 103 103 static const char *bpq_print_ethaddr(const unsigned char *); 104 104 ··· 165 165 /* 166 166 * Receive an AX.25 frame via an ethernet interface. 167 167 */ 168 - static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype) 168 + static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype, struct net_device *orig_dev) 169 169 { 170 170 int len; 171 171 char * ptr;
+4 -2
drivers/net/pppoe.c
··· 377 377 ***********************************************************************/ 378 378 static int pppoe_rcv(struct sk_buff *skb, 379 379 struct net_device *dev, 380 - struct packet_type *pt) 380 + struct packet_type *pt, 381 + struct net_device *orig_dev) 381 382 382 383 { 383 384 struct pppoe_hdr *ph; ··· 427 426 ***********************************************************************/ 428 427 static int pppoe_disc_rcv(struct sk_buff *skb, 429 428 struct net_device *dev, 430 - struct packet_type *pt) 429 + struct packet_type *pt, 430 + struct net_device *orig_dev) 431 431 432 432 { 433 433 struct pppoe_hdr *ph;
+1 -1
drivers/net/wan/hdlc_generic.c
··· 61 61 62 62 63 63 static int hdlc_rcv(struct sk_buff *skb, struct net_device *dev, 64 - struct packet_type *p) 64 + struct packet_type *p, struct net_device *orig_dev) 65 65 { 66 66 hdlc_device *hdlc = dev_to_hdlc(dev); 67 67 if (hdlc->proto.netif_rx)
+1 -1
drivers/net/wan/lapbether.c
··· 86 86 /* 87 87 * Receive a LAPB frame via an ethernet interface. 88 88 */ 89 - static int lapbeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype) 89 + static int lapbeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype, struct net_device *orig_dev) 90 90 { 91 91 int len, err; 92 92 struct lapbethdev *lapbeth;
+1 -1
drivers/net/wan/syncppp.c
··· 1447 1447 * after interrupt servicing to process frames queued via netif_rx. 1448 1448 */ 1449 1449 1450 - static int sppp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *p) 1450 + static int sppp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *p, struct net_device *orig_dev) 1451 1451 { 1452 1452 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) 1453 1453 return NET_RX_DROP;
-1
include/linux/if_vlan.h
··· 155 155 { 156 156 struct net_device_stats *stats; 157 157 158 - skb->real_dev = skb->dev; 159 158 skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; 160 159 if (skb->dev == NULL) { 161 160 dev_kfree_skb_any(skb);
+6 -4
include/linux/netdevice.h
··· 497 497 #define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) 498 498 499 499 struct packet_type { 500 - __be16 type; /* This is really htons(ether_type). */ 501 - struct net_device *dev; /* NULL is wildcarded here */ 502 - int (*func) (struct sk_buff *, struct net_device *, 503 - struct packet_type *); 500 + __be16 type; /* This is really htons(ether_type). */ 501 + struct net_device *dev; /* NULL is wildcarded here */ 502 + int (*func) (struct sk_buff *, 503 + struct net_device *, 504 + struct packet_type *, 505 + struct net_device *); 504 506 void *af_packet_priv; 505 507 struct list_head list; 506 508 };
-2
include/linux/skbuff.h
··· 164 164 * @stamp: Time we arrived 165 165 * @dev: Device we arrived on/are leaving by 166 166 * @input_dev: Device we arrived on 167 - * @real_dev: The real device we are using 168 167 * @h: Transport layer header 169 168 * @nh: Network layer header 170 169 * @mac: Link layer header ··· 205 206 struct timeval stamp; 206 207 struct net_device *dev; 207 208 struct net_device *input_dev; 208 - struct net_device *real_dev; 209 209 210 210 union { 211 211 struct tcphdr *th;
+1 -1
include/net/arp.h
··· 11 11 12 12 extern void arp_init(void); 13 13 extern int arp_rcv(struct sk_buff *skb, struct net_device *dev, 14 - struct packet_type *pt); 14 + struct packet_type *pt, struct net_device *orig_dev); 15 15 extern int arp_find(unsigned char *haddr, struct sk_buff *skb); 16 16 extern int arp_ioctl(unsigned int cmd, void __user *arg); 17 17 extern void arp_send(int type, int ptype, u32 dest_ip,
+1 -1
include/net/ax25.h
··· 316 316 317 317 /* ax25_in.c */ 318 318 extern int ax25_rx_iframe(ax25_cb *, struct sk_buff *); 319 - extern int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *); 319 + extern int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); 320 320 321 321 /* ax25_ip.c */ 322 322 extern int ax25_encapsulate(struct sk_buff *, struct net_device *, unsigned short, void *, void *, unsigned int);
+1 -1
include/net/datalink.h
··· 9 9 unsigned short header_length; 10 10 11 11 int (*rcvfunc)(struct sk_buff *, struct net_device *, 12 - struct packet_type *); 12 + struct packet_type *, struct net_device *); 13 13 int (*request)(struct datalink_proto *, struct sk_buff *, 14 14 unsigned char *); 15 15 struct list_head node;
+1 -1
include/net/ip.h
··· 86 86 u32 saddr, u32 daddr, 87 87 struct ip_options *opt); 88 88 extern int ip_rcv(struct sk_buff *skb, struct net_device *dev, 89 - struct packet_type *pt); 89 + struct packet_type *pt, struct net_device *orig_dev); 90 90 extern int ip_local_deliver(struct sk_buff *skb); 91 91 extern int ip_mr_input(struct sk_buff *skb); 92 92 extern int ip_output(struct sk_buff *skb);
+2 -1
include/net/ipv6.h
··· 346 346 347 347 extern int ipv6_rcv(struct sk_buff *skb, 348 348 struct net_device *dev, 349 - struct packet_type *pt); 349 + struct packet_type *pt, 350 + struct net_device *orig_dev); 350 351 351 352 /* 352 353 * upper-layer output functions
+5 -3
include/net/llc.h
··· 46 46 unsigned char f_bit; 47 47 int (*rcv_func)(struct sk_buff *skb, 48 48 struct net_device *dev, 49 - struct packet_type *pt); 49 + struct packet_type *pt, 50 + struct net_device *orig_dev); 50 51 struct llc_addr laddr; 51 52 struct list_head node; 52 53 struct { ··· 65 64 extern unsigned char llc_station_mac_sa[ETH_ALEN]; 66 65 67 66 extern int llc_rcv(struct sk_buff *skb, struct net_device *dev, 68 - struct packet_type *pt); 67 + struct packet_type *pt, struct net_device *orig_dev); 69 68 70 69 extern int llc_mac_hdr_init(struct sk_buff *skb, 71 70 unsigned char *sa, unsigned char *da); ··· 79 78 extern struct llc_sap *llc_sap_open(unsigned char lsap, 80 79 int (*rcv)(struct sk_buff *skb, 81 80 struct net_device *dev, 82 - struct packet_type *pt)); 81 + struct packet_type *pt, 82 + struct net_device *orig_dev)); 83 83 extern void llc_sap_close(struct llc_sap *sap); 84 84 85 85 extern struct llc_sap *llc_sap_find(unsigned char sap_value);
+2 -1
include/net/p8022.h
··· 4 4 register_8022_client(unsigned char type, 5 5 int (*func)(struct sk_buff *skb, 6 6 struct net_device *dev, 7 - struct packet_type *pt)); 7 + struct packet_type *pt, 8 + struct net_device *orig_dev)); 8 9 extern void unregister_8022_client(struct datalink_proto *proto); 9 10 10 11 #endif
+1 -1
include/net/psnap.h
··· 1 1 #ifndef _NET_PSNAP_H 2 2 #define _NET_PSNAP_H 3 3 4 - extern struct datalink_proto *register_snap_client(unsigned char *desc, int (*rcvfunc)(struct sk_buff *, struct net_device *, struct packet_type *)); 4 + extern struct datalink_proto *register_snap_client(unsigned char *desc, int (*rcvfunc)(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *orig_dev)); 5 5 extern void unregister_snap_client(struct datalink_proto *proto); 6 6 7 7 #endif
+1 -1
include/net/x25.h
··· 175 175 176 176 /* x25_dev.c */ 177 177 extern void x25_send_frame(struct sk_buff *, struct x25_neigh *); 178 - extern int x25_lapb_receive_frame(struct sk_buff *, struct net_device *, struct packet_type *); 178 + extern int x25_lapb_receive_frame(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); 179 179 extern void x25_establish_link(struct x25_neigh *); 180 180 extern void x25_terminate_link(struct x25_neigh *); 181 181
+2 -1
net/802/p8022.c
··· 35 35 struct datalink_proto *register_8022_client(unsigned char type, 36 36 int (*func)(struct sk_buff *skb, 37 37 struct net_device *dev, 38 - struct packet_type *pt)) 38 + struct packet_type *pt, 39 + struct net_device *orig_dev)) 39 40 { 40 41 struct datalink_proto *proto; 41 42
+4 -3
net/802/psnap.c
··· 47 47 * A SNAP packet has arrived 48 48 */ 49 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 52 int rc = 1; 53 53 struct datalink_proto *proto; ··· 61 61 /* Pass the frame on. */ 62 62 skb->h.raw += 5; 63 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 65 } else { 66 66 skb->sk = NULL; 67 67 kfree_skb(skb); ··· 118 118 struct datalink_proto *register_snap_client(unsigned char *desc, 119 119 int (*rcvfunc)(struct sk_buff *, 120 120 struct net_device *, 121 - struct packet_type *)) 121 + struct packet_type *, 122 + struct net_device *)) 122 123 { 123 124 struct datalink_proto *proto = NULL; 124 125
+1 -1
net/8021q/vlan.h
··· 51 51 /* found in vlan_dev.c */ 52 52 int vlan_dev_rebuild_header(struct sk_buff *skb); 53 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 55 int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, 56 56 unsigned short type, void *daddr, void *saddr, 57 57 unsigned len);
+1 -1
net/8021q/vlan_dev.c
··· 113 113 * 114 114 */ 115 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 118 unsigned char *rawp = NULL; 119 119 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data);
+1 -1
net/appletalk/aarp.c
··· 698 698 * frame. We currently only support Ethernet. 699 699 */ 700 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 703 struct elapaarp *ea = aarp_hdr(skb); 704 704 int hash, ret = 0;
+3 -3
net/appletalk/ddp.c
··· 1390 1390 * [ie ARPHRD_ETHERTALK] 1391 1391 */ 1392 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 1395 struct ddpehdr *ddp; 1396 1396 struct sock *sock; ··· 1482 1482 * header and append a long one. 1483 1483 */ 1484 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 1487 /* Expand any short form frames */ 1488 1488 if (skb->mac.raw[2] == 1) { ··· 1528 1528 } 1529 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 1532 freeit: 1533 1533 kfree_skb(skb); 1534 1534 return 0;
+4 -4
net/ax25/ax25_in.c
··· 132 132 skb->dev = ax25->ax25_dev->dev; 133 133 skb->pkt_type = PACKET_HOST; 134 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 136 return 1; 137 137 } 138 138 #endif ··· 258 258 skb->dev = dev; 259 259 skb->pkt_type = PACKET_HOST; 260 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 262 break; 263 263 264 264 case AX25_P_ARP: ··· 268 268 skb->dev = dev; 269 269 skb->pkt_type = PACKET_HOST; 270 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 272 break; 273 273 #endif 274 274 case AX25_P_TEXT: ··· 454 454 * Receive an AX.25 frame via a SLIP interface. 455 455 */ 456 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 459 skb->sk = NULL; /* Initially we don't know who it's for */ 460 460 skb->destructor = NULL; /* Who initializes this, dammit?! */
+19 -16
net/core/dev.c
··· 1058 1058 1059 1059 skb2->h.raw = skb2->nh.raw; 1060 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 1064 rcu_read_unlock(); ··· 1425 1425 1426 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 1430 struct net_device *dev = skb->dev; 1431 1431 1432 - if (dev->master) { 1433 - skb->real_dev = skb->dev; 1432 + if (dev->master) 1434 1433 skb->dev = dev->master; 1435 - } 1434 + 1435 + return dev; 1436 1436 } 1437 1437 1438 1438 static void net_tx_action(struct softirq_action *h) ··· 1482 1482 } 1483 1483 1484 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 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 1492 #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE) ··· 1497 1496 void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent); 1498 1497 1499 1498 static __inline__ int handle_bridge(struct sk_buff **pskb, 1500 - struct packet_type **pt_prev, int *ret) 1499 + struct packet_type **pt_prev, int *ret, 1500 + struct net_device *orig_dev) 1501 1501 { 1502 1502 struct net_bridge_port *port; 1503 1503 ··· 1507 1505 return 0; 1508 1506 1509 1507 if (*pt_prev) { 1510 - *ret = deliver_skb(*pskb, *pt_prev); 1508 + *ret = deliver_skb(*pskb, *pt_prev, orig_dev); 1511 1509 *pt_prev = NULL; 1512 1510 } 1513 1511 1514 1512 return br_handle_frame_hook(port, pskb); 1515 1513 } 1516 1514 #else 1517 - #define handle_bridge(skb, pt_prev, ret) (0) 1515 + #define handle_bridge(skb, pt_prev, ret, orig_dev) (0) 1518 1516 #endif 1519 1517 1520 1518 #ifdef CONFIG_NET_CLS_ACT ··· 1561 1559 int netif_receive_skb(struct sk_buff *skb) 1562 1560 { 1563 1561 struct packet_type *ptype, *pt_prev; 1562 + struct net_device *orig_dev; 1564 1563 int ret = NET_RX_DROP; 1565 1564 unsigned short type; 1566 1565 ··· 1572 1569 if (!skb->stamp.tv_sec) 1573 1570 net_timestamp(&skb->stamp); 1574 1571 1575 - skb_bond(skb); 1572 + orig_dev = skb_bond(skb); 1576 1573 1577 1574 __get_cpu_var(netdev_rx_stat).total++; 1578 1575 ··· 1593 1590 list_for_each_entry_rcu(ptype, &ptype_all, list) { 1594 1591 if (!ptype->dev || ptype->dev == skb->dev) { 1595 1592 if (pt_prev) 1596 - ret = deliver_skb(skb, pt_prev); 1593 + ret = deliver_skb(skb, pt_prev, orig_dev); 1597 1594 pt_prev = ptype; 1598 1595 } 1599 1596 } 1600 1597 1601 1598 #ifdef CONFIG_NET_CLS_ACT 1602 1599 if (pt_prev) { 1603 - ret = deliver_skb(skb, pt_prev); 1600 + ret = deliver_skb(skb, pt_prev, orig_dev); 1604 1601 pt_prev = NULL; /* noone else should process this after*/ 1605 1602 } else { 1606 1603 skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); ··· 1619 1616 1620 1617 handle_diverter(skb); 1621 1618 1622 - if (handle_bridge(&skb, &pt_prev, &ret)) 1619 + if (handle_bridge(&skb, &pt_prev, &ret, orig_dev)) 1623 1620 goto out; 1624 1621 1625 1622 type = skb->protocol; ··· 1627 1624 if (ptype->type == type && 1628 1625 (!ptype->dev || ptype->dev == skb->dev)) { 1629 1626 if (pt_prev) 1630 - ret = deliver_skb(skb, pt_prev); 1627 + ret = deliver_skb(skb, pt_prev, orig_dev); 1631 1628 pt_prev = ptype; 1632 1629 } 1633 1630 } 1634 1631 1635 1632 if (pt_prev) { 1636 - ret = pt_prev->func(skb, skb->dev, pt_prev); 1633 + ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev); 1637 1634 } else { 1638 1635 kfree_skb(skb); 1639 1636 /* Jamal, now you will not able to escape explaining
-2
net/core/skbuff.c
··· 333 333 n->sk = NULL; 334 334 C(stamp); 335 335 C(dev); 336 - C(real_dev); 337 336 C(h); 338 337 C(nh); 339 338 C(mac); ··· 396 397 397 398 new->sk = NULL; 398 399 new->dev = old->dev; 399 - new->real_dev = old->real_dev; 400 400 new->priority = old->priority; 401 401 new->protocol = old->protocol; 402 402 new->dst = dst_clone(old->dst);
+1 -1
net/decnet/af_decnet.c
··· 2064 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 2069 static struct packet_type dn_dix_packet_type = { 2070 2070 .type = __constant_htons(ETH_P_DNA_RT),
+1 -1
net/decnet/dn_route.c
··· 572 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 577 struct dn_skb_cb *cb; 578 578 unsigned char flags = 0;
+1 -1
net/econet/af_econet.c
··· 1009 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 1014 struct ec_framehdr *hdr; 1015 1015 struct sock *sk;
+2 -2
net/ipv4/arp.c
··· 700 700 static void parp_redo(struct sk_buff *skb) 701 701 { 702 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 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 932 struct arphdr *arp; 933 933
+1 -1
net/ipv4/ip_input.c
··· 358 358 /* 359 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 363 struct iphdr *iph; 364 364
+4 -4
net/ipv4/ipconfig.c
··· 393 393 394 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 398 static struct packet_type rarp_packet_type __initdata = { 399 399 .type = __constant_htons(ETH_P_RARP), ··· 414 414 * Process received RARP packet. 415 415 */ 416 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 419 struct arphdr *rarp; 420 420 unsigned char *rarp_ptr; ··· 555 555 #define DHCPRELEASE 7 556 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 560 static struct packet_type bootp_packet_type __initdata = { 561 561 .type = __constant_htons(ETH_P_IP), ··· 823 823 /* 824 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 828 struct bootp_pkt *b; 829 829 struct iphdr *h;
+1 -1
net/ipv6/ip6_input.c
··· 56 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 61 struct ipv6hdr *hdr; 62 62 u32 pkt_len;
+1 -1
net/ipx/af_ipx.c
··· 1627 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 1632 /* NULL here for pt means the packet was looped back */ 1633 1633 struct ipx_interface *intrfc;
+1 -1
net/irda/irlap_frame.c
··· 1303 1303 * Jean II 1304 1304 */ 1305 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 1308 struct irlap_info info; 1309 1309 struct irlap_cb *self;
+1 -1
net/irda/irmod.c
··· 54 54 extern void irsock_cleanup(void); 55 55 /* irlap_frame.c */ 56 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 60 * Module parameters
+2 -1
net/llc/llc_core.c
··· 103 103 struct llc_sap *llc_sap_open(unsigned char lsap, 104 104 int (*func)(struct sk_buff *skb, 105 105 struct net_device *dev, 106 - struct packet_type *pt)) 106 + struct packet_type *pt, 107 + struct net_device *orig_dev)) 107 108 { 108 109 struct llc_sap *sap = llc_sap_find(lsap); 109 110
+2 -2
net/llc/llc_input.c
··· 132 132 * data now), it queues this frame in the connection's backlog. 133 133 */ 134 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 137 struct llc_sap *sap; 138 138 struct llc_pdu_sn *pdu; ··· 165 165 * LLC functionality 166 166 */ 167 167 if (sap->rcv_func) { 168 - sap->rcv_func(skb, dev, pt); 168 + sap->rcv_func(skb, dev, pt, orig_dev); 169 169 goto out; 170 170 } 171 171 dest = llc_pdu_type(skb);
+1 -1
net/netrom/nr_dev.c
··· 64 64 skb->nh.raw = skb->data; 65 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 69 return 1; 70 70 }
+3 -3
net/packet/af_packet.c
··· 241 241 #ifdef CONFIG_SOCK_PACKET 242 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 246 struct sock *sk; 247 247 struct sockaddr_pkt *spkt; ··· 441 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 446 struct sock *sk; 447 447 struct sockaddr_ll *sll; ··· 546 546 } 547 547 548 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 551 struct sock *sk; 552 552 struct packet_sock *po;
+1 -1
net/x25/x25_dev.c
··· 81 81 } 82 82 83 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 86 struct sk_buff *nskb; 87 87 struct x25_neigh *nb;