All of lore.kernel.org
 help / color / mirror / Atom feed
* Feature request: Load u32 value into packet mark
@ 2016-12-20 11:24 Llorente Santos Jesus
  2016-12-20 12:17 ` Arturo Borrero Gonzalez
  0 siblings, 1 reply; 2+ messages in thread
From: Llorente Santos Jesus @ 2016-12-20 11:24 UTC (permalink / raw)
  To: netfilter-devel

Hi,

I have been playing quite a bit with iptables lately. Ever since the ipset was updated to support hash:ip,mark sets, there has been the potential to apply efficient matching on packet marks.
Does it make any sense to you to develop a new extension that following U32 and MARK syntax would allow us to read a 32bit value  and load it onto the packet mark ?
To make it even more versatile we could support masking when dumping the value in the packet mark.

The aim is to support very efficient packet matching/classification on any 32 bit field/region of any potential higher level protocol.

For example, read 4 bytes starting at offset 28 of the IP packet (first 4 bytes of the UDP payload), apply a mask of 0xF00F and use that result as the packet mark with mask value 0xFFFF
iptables –A FORWARD -p udp --m udp --dport 12345 -j U32MARK --set-mark "28&0xF00F/0xFFFF"


Best,
Jesus

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Feature request: Load u32 value into packet mark
  2016-12-20 11:24 Feature request: Load u32 value into packet mark Llorente Santos Jesus
@ 2016-12-20 12:17 ` Arturo Borrero Gonzalez
  0 siblings, 0 replies; 2+ messages in thread
From: Arturo Borrero Gonzalez @ 2016-12-20 12:17 UTC (permalink / raw)
  To: Llorente Santos Jesus; +Cc: netfilter-devel

On 20 December 2016 at 12:24, Llorente Santos Jesus
<jesus.llorente.santos@aalto.fi> wrote:
> Hi,
>
> I have been playing quite a bit with iptables lately. Ever since the ipset was updated to support hash:ip,mark sets, there has been the potential to apply efficient matching on packet marks.
> Does it make any sense to you to develop a new extension that following U32 and MARK syntax would allow us to read a 32bit value  and load it onto the packet mark ?

It guess what makes sense is to switch to nftables :-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-20 12:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20 11:24 Feature request: Load u32 value into packet mark Llorente Santos Jesus
2016-12-20 12:17 ` Arturo Borrero Gonzalez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.