diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-12-03 12:47:53 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-12-03 12:47:53 +0300 |
commit | df60673198ae678f68af54873b8904ba93fe13a0 (patch) | |
tree | 6e9a3393d0be7b68a69c2bbc58f4325ceb6fd853 /net/batman-adv/bat_v_elp.c | |
parent | 89f579ce99f7e028e81885d3965f973c0f787611 (diff) | |
parent | 2595646791c319cadfdbf271563aac97d0843dc7 (diff) | |
download | linux-df60673198ae678f68af54873b8904ba93fe13a0.tar.xz |
Merge tag 'v4.20-rc5' into x86/cleanups, to sync up the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/batman-adv/bat_v_elp.c')
-rw-r--r-- | net/batman-adv/bat_v_elp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index 9f481cfdf77d..e8090f099eb8 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -352,19 +352,21 @@ out: */ int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface) { + static const size_t tvlv_padding = sizeof(__be32); struct batadv_elp_packet *elp_packet; unsigned char *elp_buff; u32 random_seqno; size_t size; int res = -ENOMEM; - size = ETH_HLEN + NET_IP_ALIGN + BATADV_ELP_HLEN; + size = ETH_HLEN + NET_IP_ALIGN + BATADV_ELP_HLEN + tvlv_padding; hard_iface->bat_v.elp_skb = dev_alloc_skb(size); if (!hard_iface->bat_v.elp_skb) goto out; skb_reserve(hard_iface->bat_v.elp_skb, ETH_HLEN + NET_IP_ALIGN); - elp_buff = skb_put_zero(hard_iface->bat_v.elp_skb, BATADV_ELP_HLEN); + elp_buff = skb_put_zero(hard_iface->bat_v.elp_skb, + BATADV_ELP_HLEN + tvlv_padding); elp_packet = (struct batadv_elp_packet *)elp_buff; elp_packet->packet_type = BATADV_ELP; |