From 9e3a5af4fcd946d0d1e32c25700ae6e042f4d7be Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:23:55 +0100 Subject: [PATCH] Revert "net: nexthop: Initialize all fields in dumped nexthops" This reverts commit ce425a0621351163dbdf7333f5f7b3f2913c19aa. --- net/ipv4/nexthop.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index 6a71b3bbe..84e817ac3 100755 --- a/net/ipv4/nexthop.c +++ b/net/ipv4/nexthop.c @@ -210,10 +210,9 @@ static int nla_put_nh_group(struct sk_buff *skb, struct nh_group *nhg) p = nla_data(nla); for (i = 0; i < nhg->num_nh; ++i) { - *p++ = (struct nexthop_grp) { - .id = nhg->nh_entries[i].nh->id, - .weight = nhg->nh_entries[i].weight - 1, - }; + p->id = nhg->nh_entries[i].nh->id; + p->weight = nhg->nh_entries[i].weight - 1; + p += 1; } return 0;