]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/ipv4/nexthop.c
Merge tag 'backlight-next-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee...
[linux.git] / net / ipv4 / nexthop.c
index 511eaa94e2d161cb00579cca4dd3d5163bbacc98..d072c326dd641663a39357eb12f0fec259cb8911 100644 (file)
@@ -321,7 +321,9 @@ static size_t nh_nlmsg_size_single(struct nexthop *nh)
 
 static size_t nh_nlmsg_size(struct nexthop *nh)
 {
-       size_t sz = nla_total_size(4);    /* NHA_ID */
+       size_t sz = NLMSG_ALIGN(sizeof(struct nhmsg));
+
+       sz += nla_total_size(4); /* NHA_ID */
 
        if (nh->is_group)
                sz += nh_nlmsg_size_grp(nh);