FreeBSD Bugzilla – Attachment 148792 Details for
Bug 194577
mbuf packet header leakage when closing TUN devices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Cleanup altq before destroy
ifq_cleanup.diff (text/plain), 602 bytes, created by
Hans Petter Selasky
on 2014-10-30 07:28:26 UTC
(
hide
)
Description:
Cleanup altq before destroy
Filename:
MIME Type:
Creator:
Hans Petter Selasky
Created:
2014-10-30 07:28:26 UTC
Size:
602 bytes
patch
obsolete
>diff --git a/sys/net/if.c b/sys/net/if.c >index 395995d..dd24ed7 100644 >--- a/sys/net/if.c >+++ b/sys/net/if.c >@@ -560,7 +560,9 @@ if_rele(struct ifnet *ifp) > void > ifq_init(struct ifaltq *ifq, struct ifnet *ifp) > { >- >+ >+ memset(ifq, 0, sizeof(*ifq)); >+ > mtx_init(&ifq->ifq_mtx, ifp->if_xname, "if send queue", MTX_DEF); > > if (ifq->ifq_maxlen == 0) >@@ -576,6 +578,14 @@ ifq_init(struct ifaltq *ifq, struct ifnet *ifp) > void > ifq_delete(struct ifaltq *ifq) > { >+ struct mbuf *m; >+ >+ while (1) { >+ IF_DEQUEUE(ifq, m); >+ if (m == NULL) >+ break; >+ m_freem(m); >+ } > mtx_destroy(&ifq->ifq_mtx); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194577
:
148695
|
148778
| 148792