* End a nested netlink attribute. * It follows a call to tap_nlattr_nested_start(). * In effect, it will modify the nested attribute length to include every bytes * from the nested attribute start, up to here. * * @param[in, out] msg * The netlink message where to edit the nested_tails metadata. */
| 399 | * The netlink message where to edit the nested_tails metadata. |
| 400 | */ |
| 401 | void |
| 402 | tap_nlattr_nested_finish(struct nlmsg *msg) |
| 403 | { |
| 404 | struct nested_tail *tail = msg->nested_tails; |
| 405 | |
| 406 | tail->tail->rta_len = (char *)NLMSG_TAIL(&msg->nh) - (char *)tail->tail; |
| 407 | |
| 408 | if (tail->prev) |
| 409 | msg->nested_tails = tail->prev; |
| 410 | |
| 411 | rte_free(tail); |
| 412 | } |
no test coverage detected