Pass mtag argument into m_tag_locate() to continue the search from

the last found mtag.
This commit is contained in:
ae 2015-05-06 14:02:57 +00:00
parent 462d48d659
commit 82077d8af2

View File

@ -477,7 +477,7 @@ me_check_nesting(struct ifnet *ifp, struct mbuf *m)
count = 1;
mtag = NULL;
while ((mtag = m_tag_locate(m, MTAG_ME, 0, NULL)) != NULL) {
while ((mtag = m_tag_locate(m, MTAG_ME, 0, mtag)) != NULL) {
if (*(struct ifnet **)(mtag + 1) == ifp) {
log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname);
return (EIO);