diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-18 14:43:47 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-18 18:17:54 -0600 |
commit | 2b8243a13f5a640de7bdade1005e903027ff1e12 (patch) | |
tree | 1f49fcfb17c0fda2845e044a646b17f25bcff7ff | |
parent | b4fc14a113963c219c2a30adedf79b010b34376b (diff) |
send: use normaler alignment formula from upstream
Slightly more meh, but upstream likes it better, and I'd rather minimize
the delta between trees.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/send.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -147,7 +147,7 @@ static unsigned int calculate_skb_padding(struct sk_buff *skb) unsigned int padded_size, last_unit = skb->len; if (unlikely(!PACKET_CB(skb)->mtu)) - return -last_unit % MESSAGE_PADDING_MULTIPLE; + return ALIGN(last_unit, MESSAGE_PADDING_MULTIPLE) - last_unit; /* We do this modulo business with the MTU, just in case the networking * layer gives us a packet that's bigger than the MTU. In that case, we |