Merge branch 'be2net-fixes'
[cascardo/linux.git] / net / ipv4 / tcp_metrics.c
index 7b7eec4..bf1f3b2 100644 (file)
@@ -751,7 +751,7 @@ static struct genl_family tcp_metrics_nl_family = {
        .netnsok        = true,
 };
 
-static struct nla_policy tcp_metrics_nl_policy[TCP_METRICS_ATTR_MAX + 1] = {
+static const struct nla_policy tcp_metrics_nl_policy[TCP_METRICS_ATTR_MAX + 1] = {
        [TCP_METRICS_ATTR_ADDR_IPV4]    = { .type = NLA_U32, },
        [TCP_METRICS_ATTR_ADDR_IPV6]    = { .type = NLA_BINARY,
                                            .len = sizeof(struct in6_addr), },
@@ -800,7 +800,8 @@ static int tcp_metrics_fill_info(struct sk_buff *msg,
        }
 
        if (nla_put_msecs(msg, TCP_METRICS_ATTR_AGE,
-                         jiffies - tm->tcpm_stamp) < 0)
+                         jiffies - tm->tcpm_stamp,
+                         TCP_METRICS_ATTR_PAD) < 0)
                goto nla_put_failure;
        if (tm->tcpm_ts_stamp) {
                if (nla_put_s32(msg, TCP_METRICS_ATTR_TW_TS_STAMP,
@@ -864,7 +865,8 @@ static int tcp_metrics_fill_info(struct sk_buff *msg,
                    (nla_put_u16(msg, TCP_METRICS_ATTR_FOPEN_SYN_DROPS,
                                tfom->syn_loss) < 0 ||
                     nla_put_msecs(msg, TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS,
-                               jiffies - tfom->last_syn_loss) < 0))
+                               jiffies - tfom->last_syn_loss,
+                               TCP_METRICS_ATTR_PAD) < 0))
                        goto nla_put_failure;
                if (tfom->cookie.len > 0 &&
                    nla_put(msg, TCP_METRICS_ATTR_FOPEN_COOKIE,