diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-30 17:36:36 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-30 17:37:08 +0200 |
commit | 1493695c6ba2b169523f7c2097fac8e8343352fe (patch) | |
tree | 0a0e5296b7b53d79a99aa3ebf254c124e1373414 /proto/perf/perf.c | |
parent | 7b0c89a47fa1f63248ceaa1e9c1b3948dd29a68d (diff) | |
parent | f15f2fcee7eeb5a100bd204a0e67018e25953420 (diff) |
Merge commit 'f15f2fcee7eeb5a100bd204a0e67018e25953420' into haugesund
Diffstat (limited to 'proto/perf/perf.c')
-rw-r--r-- | proto/perf/perf.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/proto/perf/perf.c b/proto/perf/perf.c index 2cb60e3e..71925bf1 100644 --- a/proto/perf/perf.c +++ b/proto/perf/perf.c @@ -144,13 +144,19 @@ perf_loop(void *data) if (!p->attrs_per_rte || !(i % p->attrs_per_rte)) { struct rta a0 = { .dest = RTD_UNICAST, + }; + + ea_set_attr_u32(&a0.eattrs, &ea_gen_preference, 0, p->p.main_channel->preference); + ea_set_attr_u32(&a0.eattrs, &ea_gen_source, 0, RTS_PERF); + + struct nexthop_adata nhad = { .nh.iface = p->ifa->iface, .nh.gw = gw, .nh.weight = 1, }; - ea_set_attr_u32(&a0.eattrs, &ea_gen_preference, 0, p->p.main_channel->preference); - ea_set_attr_u32(&a0.eattrs, &ea_gen_source, 0, RTS_PERF); + ea_set_attr_data(&a0.eattrs, &ea_gen_nexthop, 0, + &nhad.ad.data, sizeof nhad - sizeof nhad.ad); p->data[i].a = rta_lookup(&a0); } |