ng_ether.c (123600) | ng_ether.c (124269) |
---|---|
1 2/* 3 * ng_ether.c 4 * 5 * Copyright (c) 1996-2000 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 23 unchanged lines hidden (view full) --- 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Authors: Archie Cobbs <archie@freebsd.org> 38 * Julian Elischer <julian@freebsd.org> 39 * | 1 2/* 3 * ng_ether.c 4 * 5 * Copyright (c) 1996-2000 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 23 unchanged lines hidden (view full) --- 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Authors: Archie Cobbs <archie@freebsd.org> 38 * Julian Elischer <julian@freebsd.org> 39 * |
40 * $FreeBSD: head/sys/netgraph/ng_ether.c 123600 2003-12-17 12:40:34Z ru $ | 40 * $FreeBSD: head/sys/netgraph/ng_ether.c 124269 2004-01-09 00:41:45Z green $ |
41 */ 42 43/* 44 * ng_ether(4) netgraph node type 45 */ 46 47#include <sys/param.h> 48#include <sys/systm.h> --- 543 unchanged lines hidden (view full) --- 592 * Shutdown node. This resets the node but does not remove it 593 * unless the REALLY_DIE flag is set. 594 */ 595static int 596ng_ether_shutdown(node_p node) 597{ 598 const priv_p priv = NG_NODE_PRIVATE(node); 599 | 41 */ 42 43/* 44 * ng_ether(4) netgraph node type 45 */ 46 47#include <sys/param.h> 48#include <sys/systm.h> --- 543 unchanged lines hidden (view full) --- 592 * Shutdown node. This resets the node but does not remove it 593 * unless the REALLY_DIE flag is set. 594 */ 595static int 596ng_ether_shutdown(node_p node) 597{ 598 const priv_p priv = NG_NODE_PRIVATE(node); 599 |
600 if (priv->promisc) { /* disable promiscuous mode */ 601 (void)ifpromisc(priv->ifp, 0); 602 priv->promisc = 0; 603 } | |
604 if (node->nd_flags & NG_REALLY_DIE) { 605 /* 606 * WE came here because the ethernet card is being unloaded, 607 * so stop being persistant. 608 * Actually undo all the things we did on creation. 609 * Assume the ifp has already been freed. 610 */ 611 NG_NODE_SET_PRIVATE(node, NULL); 612 FREE(priv, M_NETGRAPH); 613 NG_NODE_UNREF(node); /* free node itself */ 614 return (0); 615 } | 600 if (node->nd_flags & NG_REALLY_DIE) { 601 /* 602 * WE came here because the ethernet card is being unloaded, 603 * so stop being persistant. 604 * Actually undo all the things we did on creation. 605 * Assume the ifp has already been freed. 606 */ 607 NG_NODE_SET_PRIVATE(node, NULL); 608 FREE(priv, M_NETGRAPH); 609 NG_NODE_UNREF(node); /* free node itself */ 610 return (0); 611 } |
612 if (priv->promisc) { /* disable promiscuous mode */ 613 (void)ifpromisc(priv->ifp, 0); 614 priv->promisc = 0; 615 } |
|
616 priv->autoSrcAddr = 1; /* reset auto-src-addr flag */ 617 node->nd_flags &= ~NG_INVALID; /* Signal ng_rmnode we are persisant */ 618 return (0); 619} 620 621/* 622 * Hook disconnection. 623 */ --- 84 unchanged lines hidden --- | 616 priv->autoSrcAddr = 1; /* reset auto-src-addr flag */ 617 node->nd_flags &= ~NG_INVALID; /* Signal ng_rmnode we are persisant */ 618 return (0); 619} 620 621/* 622 * Hook disconnection. 623 */ --- 84 unchanged lines hidden --- |