Page MenuHomeFreeBSD

ng_tty: don't increment m_data
ClosedPublic

Authored by vexeduxr on Sep 23 2025, 9:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 6, 10:25 PM
Unknown Object (File)
Tue, Nov 25, 9:43 AM
Unknown Object (File)
Mon, Nov 24, 9:05 PM
Unknown Object (File)
Fri, Nov 21, 3:30 AM
Unknown Object (File)
Nov 7 2025, 9:36 PM
Unknown Object (File)
Nov 4 2025, 9:32 PM
Unknown Object (File)
Nov 2 2025, 10:46 AM
Unknown Object (File)
Oct 29 2025, 6:53 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/netgraph/ng_tty.c
488

That would also imply that the previous code was pretty boken, right? This appends to mbuf at m->m_len, but *mtod(m, u_char *) = c is effectively m_data[0] = c rather than m_data[m_len++] = c

sys/netgraph/ng_tty.c
488

Oh, I guess if it's always incrementing m_data. sorry.

sys/netgraph/ng_tty.c
488

Doing some more digging, this used to rely on setting m_data to m_pktdat before sending it off, but that seems to have been broken since 2ffded5

Thanks a lot for the fix and sorry for the breakage.

This revision is now accepted and ready to land.Sep 24 2025, 11:33 AM
This revision was automatically updated to reflect the committed changes.