}
}
- tail = NLMSG_TAIL(n);
-
if (reorder.probability) {
if (opt.latency == 0) {
fprintf(stderr, "reordering not possible without specifying some delay\n");
return -1;
}
- if (addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt)) < 0)
- return -1;
+ tail = addattr_nest_compat(n, 1024, TCA_OPTIONS, &opt, sizeof(opt));
if (present[TCA_NETEM_CORR] &&
addattr_l(n, 1024, TCA_NETEM_CORR, &cor, sizeof(cor)) < 0)
return -1;
free(dist_data);
}
- tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
+ addattr_nest_compat_end(n, tail);
return 0;
}