]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
if_wg: fix erroneous calculation in calculate_padding() for p_mtu == 0
authorAaron LI <aly@aaronly.me>
Wed, 17 Jan 2024 23:29:23 +0000 (23:29 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Wed, 17 Jan 2024 23:29:52 +0000 (17:29 -0600)
commitb891f61ef538a4e9b4658b4b756635c8036a5788
tree86f00f8759b97915c6f12d2e0f2455d75548c17b
parent8bae22bbbe6571da9259e0d43ffa8a56f4b3e171
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
sys/dev/wg/if_wg.c