CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2025/01/09 06:22:16
Modified files:
sys/net : Tag: OPENBSD_7_5 if_wg.c
Log message:
Rewrite mbuf handling in wg(4).
. Use m_align() to ensure that mbufs are packed towards the end so that
additional headers don't require costly m_prepends.
. Stop using m_copyback(), the way it was used there was actually wrong,
instead just use memcpy since this is just a single mbuf.
. Kill all usage of m_calchdrlen(), again this is not needed or can simply
be m->m_pkthdr.len = m->m_len since all this code uses a single buffer.
. In wg_encap() remove the min() with t->t_mtu when calculating plaintext_len
and out_len. The code does not correctly cope with this min() at all with
severe consequences.
Initial diff by dhill@ who found the m_prepend() issue.
Tested by various people.
from claudio@; OK dhill@ mvs@ bluhm@ sthen@
this is errata/7.5/015_wg.patch.sig