Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Dec 2024 19:05:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 283315] if_ffec receive packet size in mbuf header is not properly adjusted and is 2 bytes too large.
Message-ID:  <bug-283315-227-5RL9sfsMOA@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-283315-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283315

--- Comment #1 from Mike Belanger <mibelanger@qnx.com> ---
The following would be better, i.e. use m_adj instead of modifying m->m_data:

        if (sc->fecflags & FECFLAG_RACC) {
-               m->m_data = mtod(m, uint8_t *) + 2;
+               m_adj(m, 2);

        } else {
                src = mtod(m, uint8_t*);
                dst = src - ETHER_ALIGN;
                bcopy(src, dst, len);
                m->m_data = dst;
        }

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-283315-227-5RL9sfsMOA>