Unverified Commit 60430951 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10947 net: nexthop: Initialize all fields in dumped nexthops

parents 1d532493 a348e9e5
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -210,9 +210,10 @@ 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->id = nhg->nh_entries[i].nh->id;
		p->weight = nhg->nh_entries[i].weight - 1;
		p += 1;
		*p++ = (struct nexthop_grp) {
			.id = nhg->nh_entries[i].nh->id,
			.weight = nhg->nh_entries[i].weight - 1,
		};
	}

	return 0;