aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/send.c b/src/send.c
index 3c3f04e..9290bb9 100644
--- a/src/send.c
+++ b/src/send.c
@@ -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