[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALx6S341pXBgh9DJBfzOao_DVm5VMB6AC5dvV2Krju=f+PMkNQ@mail.gmail.com>
Date: Fri, 15 Jan 2016 09:25:40 -0800
From: Tom Herbert <tom@...bertland.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>,
Pablo Neira Ayuso <pablo@...filter.org>,
Patrick McHardy <kaber@...sh.net>,
netfilter-devel <netfilter-devel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
Herbert Xu <herbert@...dor.apana.org.au>
Subject: Re: [PATCH net] netfilter: xt_TCPMSS: handle CHECKSUM_COMPLETE in tcpmss_tg6()
On Fri, Jan 15, 2016 at 9:18 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Fri, 2016-01-15 at 08:43 -0800, Tom Herbert wrote:
>
>> Probably should have a utility function do this. Maybe something like
>> update_hdr_field(skb, old, new)? Could return new value so above could
>> just be:
>>
>> ipv6h->payload_len = update_hdr_field(skb, ipv6h->payload_len,
>> htons(ntohs(oldlen) + ret);
>
> Well, oldlen would still need to be ipv6h->payload_len
>
That comes from the second argument.
> Not sure a helper will be nice for a stable submission.
>
> Probably better for net-next ?
>
I think this would apply to ipv6: update skb->csum when CE mark is
propagated also, maybe others? Seems safer to implement the logic only
in one place if possible... No big deal though.
>
Powered by blists - more mailing lists