af_packet.c (e730c15519d09ea528b4d2f1103681fa5937c0e6) af_packet.c (e9dc86534051b78e41e5b746cccc291b57a3a311)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * PACKET - implements raw packet sockets.
7 *
8 * Version: $Id: af_packet.c,v 1.61 2002/02/08 03:57:19 davem Exp $

--- 1463 unchanged lines hidden (view full) ---

1472
1473
1474static int packet_notifier(struct notifier_block *this, unsigned long msg, void *data)
1475{
1476 struct sock *sk;
1477 struct hlist_node *node;
1478 struct net_device *dev = data;
1479
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * PACKET - implements raw packet sockets.
7 *
8 * Version: $Id: af_packet.c,v 1.61 2002/02/08 03:57:19 davem Exp $

--- 1463 unchanged lines hidden (view full) ---

1472
1473
1474static int packet_notifier(struct notifier_block *this, unsigned long msg, void *data)
1475{
1476 struct sock *sk;
1477 struct hlist_node *node;
1478 struct net_device *dev = data;
1479
1480 if (dev->nd_net != &init_net)
1481 return NOTIFY_DONE;
1482
1480 read_lock(&packet_sklist_lock);
1481 sk_for_each(sk, node, &packet_sklist) {
1482 struct packet_sock *po = pkt_sk(sk);
1483
1484 switch (msg) {
1485 case NETDEV_UNREGISTER:
1486 if (po->mclist)
1487 packet_dev_mclist(dev, po->mclist, -1);

--- 503 unchanged lines hidden ---
1483 read_lock(&packet_sklist_lock);
1484 sk_for_each(sk, node, &packet_sklist) {
1485 struct packet_sock *po = pkt_sk(sk);
1486
1487 switch (msg) {
1488 case NETDEV_UNREGISTER:
1489 if (po->mclist)
1490 packet_dev_mclist(dev, po->mclist, -1);

--- 503 unchanged lines hidden ---