Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Add some missing ALTQ initialization, pointed out by
details: https://anonhg.NetBSD.org/src/rev/55c38be47e09
branches: trunk
changeset: 504456:55c38be47e09
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Mar 03 03:29:20 2001 +0000
description:
Add some missing ALTQ initialization, pointed out by
Kenjiro Cho <kjc%csl.sony.co.jp@localhost>.
diffstat:
sys/net/if.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r 25b34c0fa4df -r 55c38be47e09 sys/net/if.c
--- a/sys/net/if.c Sat Mar 03 02:21:26 2001 +0000
+++ b/sys/net/if.c Sat Mar 03 03:29:20 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.85 2001/02/20 15:35:20 itojun Exp $ */
+/* $NetBSD: if.c,v 1.86 2001/03/03 03:29:20 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -400,6 +400,14 @@
ifp->if_link_state = LINK_STATE_UNKNOWN;
+#ifdef ALTQ
+ ifp->if_snd.altq_type = 0;
+ ifp->if_snd.altq_disc = NULL;
+ ifp->if_snd.altq_flags &= ALTQF_CANTCHANGE;
+ ifp->if_snd.altq_tbr = NULL;
+ ifp->if_snd.altq_ifp = ifp;
+#endif
+
/* Announce the interface. */
rt_ifannouncemsg(ifp, IFAN_ARRIVAL);
}
@@ -465,6 +473,13 @@
*/
if_down(ifp);
+#ifdef ALTQ
+ if (ALTQ_IS_ENABLED(&ifp->if_snd))
+ altq_disable(&ifp->if_snd);
+ if (ALTQ_IS_ATTACHED(&ifp->if_snd))
+ altq_detach(&ifp->if_snd);
+#endif
+
if_free_sadl(ifp);
/*
Home |
Main Index |
Thread Index |
Old Index