[ovs-dev] [PATCHv4 1/2] conntrack: Fix icmp conntrack state.
Yi-Hung Wei
yihung.wei at gmail.com
Tue Apr 28 18:07:36 UTC 2020
On Mon, Apr 27, 2020 at 8:42 AM William Tu <u9012063 at gmail.com> wrote:
>
> ICMP conntrack state should be ICMPS_REPLY after seeing both
> side of ICMP traffic.
>
> Signed-off-by: William Tu <u9012063 at gmail.com>
> ---
> lib/conntrack-icmp.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/lib/conntrack-icmp.c b/lib/conntrack-icmp.c
> index 63246f0124d0..6cbf9656dd93 100644
> --- a/lib/conntrack-icmp.c
> +++ b/lib/conntrack-icmp.c
> @@ -50,9 +50,12 @@ icmp_conn_update(struct conntrack *ct, struct conn *conn_,
> struct dp_packet *pkt OVS_UNUSED, bool reply, long long now)
> {
> struct conn_icmp *conn = conn_icmp_cast(conn_);
> - conn->state = reply ? ICMPS_REPLY : ICMPS_FIRST;
> - conn_update_expiration(ct, &conn->up, icmp_timeouts[conn->state], now);
>
> + if (reply && conn->state == ICMPS_FIRST) {
> + conn->state = ICMPS_REPLY;
> + }
> +
> + conn_update_expiration(ct, &conn->up, icmp_timeouts[conn->state], now);
> return CT_UPDATE_VALID;
> }
>
> --
Thanks for the patch. Looks good to me.
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
More information about the dev
mailing list