]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Static: Fixed undefined nexthop padding problems
authorMaria Matejka <mq@ucw.cz>
Wed, 22 May 2024 06:56:37 +0000 (08:56 +0200)
committerMaria Matejka <mq@ucw.cz>
Sat, 25 May 2024 17:37:26 +0000 (19:37 +0200)
proto/static/static.c

index aa3f7bac530c70a2da528c8cc11b7b21fff62196..f6fb50d09dc434c045cad8867118703e32065f20 100644 (file)
@@ -80,12 +80,10 @@ static_announce_rte(struct static_proto *p, struct static_route *r)
       if (!r2->active)
        continue;
 
-      *nh = (struct nexthop) {
-       .gw = r2->via,
-       .iface = r2->neigh->iface,
-       .flags = r2->onlink ? RNF_ONLINK : 0,
-       .weight = r2->weight,
-      };
+      nh->gw = r2->via;
+      nh->iface = r2->neigh->iface;
+      nh->flags = r2->onlink ? RNF_ONLINK : 0;
+      nh->weight = r2->weight;
 
       if (r2->mls)
       {