Fix infinite loop in ng_iface, that happens when packet passes out via
two different ng interfaces sequentially due to tunnelling. PR: kern/134557 Submitted by: Mikolaj Golub Approved by: re (kensmith) MFC after: 3 days
This commit is contained in:
parent
f09a384fae
commit
505feb8f37
@ -382,7 +382,8 @@ ng_iface_output(struct ifnet *ifp, struct mbuf *m,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Protect from deadly infinite recursion. */
|
/* Protect from deadly infinite recursion. */
|
||||||
while ((mtag = m_tag_locate(m, MTAG_NGIF, MTAG_NGIF_CALLED, NULL))) {
|
mtag = NULL;
|
||||||
|
while ((mtag = m_tag_locate(m, MTAG_NGIF, MTAG_NGIF_CALLED, mtag))) {
|
||||||
if (*(struct ifnet **)(mtag + 1) == ifp) {
|
if (*(struct ifnet **)(mtag + 1) == ifp) {
|
||||||
log(LOG_NOTICE, "Loop detected on %s\n", ifp->if_xname);
|
log(LOG_NOTICE, "Loop detected on %s\n", ifp->if_xname);
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user