On Wed Nov 18, 2026 at 10:55 PM CET, Aaron Conole via dev wrote:
> External email: Use caution opening links or attachments
>
>
> The FTP and TFTP helpers were scattered all over the conntrack TU making
> reading the individual FTP parts a bit difficult. Now that the handling
> is more modular, split them out into their own files.
>
> Signed-off-by: Aaron Conole <[email protected]>
> ---
Great cleanup.
two nits
> diff --git a/lib/conntrack-ftp.c b/lib/conntrack-ftp.c
> new file mode 100644
> index 0000000000..20ed7ac522
> --- /dev/null
> +++ b/lib/conntrack-ftp.c
> @@ -0,0 +1,690 @@
> +/*
> + * Copyright (c) 2015-2019 Nicira, Inc.
> + * Copyright (c) 2026 Red Hat, Inc.
> + *
> + * Licensed under the Apache License, Version 2.0 (the "License");
> + * you may not use this file except in compliance with the License.
> + * You may obtain a copy of the License at:
> + *
> + * https://[...]
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +
> +#include <config.h>
> +
> +#include <ctype.h>
> +#include <sys/types.h>
> +#include <netinet/in.h>
Out of order?
> +#include <string.h>
> +
> +#include "conntrack-private.h"
> +#include "csum.h"
> +#include "dp-packet.h"
> +#include "openvswitch/vlog.h"
> +#include "packets.h"
> +#include "unaligned.h"
[...]
> diff --git a/lib/conntrack-private.h b/lib/conntrack-private.h
> index 74aee58685..685002b416 100644
> --- a/lib/conntrack-private.h
> +++ b/lib/conntrack-private.h
> @@ -177,6 +177,9 @@ enum ct_ephemeral_range {
> MAX_NAT_EPHEMERAL_PORT = 65535
> };
>
> +/* The maximum TCP or UDP port number. */
> +#define CT_MAX_L4_PORT 65535
> +
> #define IN_RANGE(curr, min, max) \
> (curr >= min && curr <= max)
>
> @@ -261,6 +264,9 @@ enum ct_alg_ctl_type {
> /* SIP is not enabled through OpenFlow and is present only as an example
> * of an ALG that allows a wildcard source IP address. */
> CT_ALG_CTL_SIP,
> +
> + /* MAX ALG */
> + CT_ALG_CTL_MAX,
Isn't it supposed to be N_CT_ALG_CTL, according to coding style?
Fine either way, just to point it out.
> };
>
> extern struct ct_l4_proto ct_proto_tcp;
> @@ -299,6 +305,28 @@ struct conn_lookup_ctx {
> bool icmp_related;
> };
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev