Re: [PATCH] netfilter: nat: Update obsolete comment on get_unique_tuple()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 28, 2019 at 12:23:08AM +0300, Yonatan Goldschmidt wrote:
> Commit c7232c9979cba ("netfilter: add protocol independent NAT core")
> added nf_nat_core.c based on ipv4/netfilter/nf_nat_core.c,
> with this comment copied.
> 
> Referred function doesn't exist anymore, and anyway since day one
> of this file it should have referred the generic __nf_conntrack_confirm(),
> added in 9fb9cbb1082d6.
> 
> Signed-off-by: Yonatan Goldschmidt <yon.goldschmidt@xxxxxxxxx>
> ---
>  net/netfilter/nf_nat_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
> index 9ab410455992..3f6023ed4966 100644
> --- a/net/netfilter/nf_nat_core.c
> +++ b/net/netfilter/nf_nat_core.c
> @@ -519,7 +519,7 @@ static void nf_nat_l4proto_unique_tuple(struct nf_conntrack_tuple *tuple,
>   * and NF_INET_LOCAL_OUT, we change the destination to map into the
>   * range. It might not be possible to get a unique tuple, but we try.
>   * At worst (or if we race), we will end up with a final duplicate in
> - * __ip_conntrack_confirm and drop the packet. */
> + * __nf_conntrack_confirm and drop the packet. */

I dislike this oneliners to update comments, I tend to think it's too
much overhead a patch just to update something obvious to the reader.

However, I also understand you may want to fix this while passing by
here.

So my sugggestion is that you run:

        git grep ip_conntrack

in the tree, searching for comments and documentation that can be
updated, eg.

net/netfilter/nf_conntrack_proto_icmp.c:        /* See ip_conntrack_proto_tcp.c */

Please, only update comments / documentation in your patch.

The ip_conntrack_ prefix is legacy, that it was used by the time there
was only support for IPv4 in the connection tracking system.

Thanks.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux