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

Details

Provenance
aly_aaronly.meAuthored on Jan 17 2024, 11:29 PM
kevansCommitted on Jan 17 2024, 11:29 PM
Parents
rG8bae22bbbe65: fusefs: prefer new/delete over malloc/free
Branches
Unknown
Tags
Unknown