HomeFreeBSD

if_wg: fix erroneous calculation in calculate_padding() for p_mtu == 0

Description

if_wg: fix erroneous calculation in calculate_padding() for p_mtu == 0

In practice this is harmless; only keepalive packets may realistically have
p_mtu == 0, and they'll also have no payload so the math works out the same
either way. Still, let's prefer technical accuracy and calculate the amount
of padding needed rather than the padded length...

PR: 276363

(cherry picked from commit b891f61ef538a4e9b4658b4b756635c8036a5788)

Details

Provenance
aly_aaronly.meAuthored on Jan 17 2024, 11:29 PM
kevansCommitted on Jan 30 2024, 5:37 AM
Parents
rG11cf350c3893: condvar: Fix a user-after-free in _cv_wait() when ktrace is enabled
Branches
Unknown
Tags
Unknown