Re: [RFC PATCH nf-next] netfilter: conntrack: add support for storing DiffServ code-point as CT mark.

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

 



Jeremy Sowden <jeremy@xxxxxxxxxx> wrote:
> On 2019-12-10, at 02:25:42 +0100, Florian Westphal wrote:
> > Jeremy Sowden <jeremy@xxxxxxxxxx> wrote:
> > > > I have older patches that adds a 'typeof' keyword for set
> > > > definitions, maybe it could be used for this casting too.
> > >
> > > These?
> > >
> > >   https://lore.kernel.org/netfilter-devel/20190816144241.11469-1-fw@xxxxxxxxx/
> >
> > Yes, still did not yet have time to catch up and implement what Pablo
> > suggested though.
> 
> I'll take a look.

No need, I plan to resurrect this work soon.
If you really want to have a stab at it, let me know and I will rebase
what I have locally and push it out to a scratch repo for you.

Its not related to the 'ct mark' issue.  On second thought, reusing the
typeof keyword doesn't look like a good idea either.

We have, in most simple cases:

ct mark set 1
tcp dport set 42
ip daddr set 10.1.2.3

i.e. type on right side matches type of the left-hand expression.

tcp dport set 65536

would throw an error, as the number is out of range for the expected
port.

I thought that we could reuse typeof keyword:

tcp dport set typeof tcp dport 65536

But I'm not sure, it looks redundant, and I can't think of a
use-case/reason where one would need an 'intermediate type'
different from what is on the left-hand side.



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

  Powered by Linux