Show bad behaviors with command show bad

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2019-10-15 14:15:21 +00:00
parent 289d88f3a7
commit 8bd936929e
4 changed files with 52 additions and 2 deletions

View File

@@ -370,6 +370,10 @@ gt_bind(int argc, char **argv)
res.status.bind = bind_addr;
res.status.peer = peer_addr;
break;
case CTL_BAD:
if (mud_get_bad(mud, &res.bad))
res.ret = errno;
break;
}
if (sendto(ctl_fd, &res, sizeof(res), 0,
(const struct sockaddr *)&ss, sl) == -1)