diff options
Diffstat (limited to 'udp_flow.c')
-rw-r--r-- | udp_flow.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -34,12 +34,12 @@ struct udp_flow *udp_at_sidx(flow_sidx_t sidx) return &flow->udp; } -/* +/** * udp_flow_close() - Close and clean up UDP flow * @c: Execution context * @uflow: UDP flow */ -static void udp_flow_close(const struct ctx *c, struct udp_flow *uflow) +void udp_flow_close(const struct ctx *c, struct udp_flow *uflow) { if (uflow->s[INISIDE] >= 0) { /* The listening socket needs to stay in epoll */ @@ -53,6 +53,9 @@ static void udp_flow_close(const struct ctx *c, struct udp_flow *uflow) close(uflow->s[TGTSIDE]); uflow->s[TGTSIDE] = -1; } + + uflow->last_errno = 0; + flow_hash_remove(c, FLOW_SIDX(uflow, INISIDE)); if (!pif_is_socket(uflow->f.pif[TGTSIDE])) flow_hash_remove(c, FLOW_SIDX(uflow, TGTSIDE)); |