Skip to contentSkip to conversation

Match bits

DISCUSSION Peteris Krumins 2 participants 2 messages Mar 30, 2003 – Apr 4, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

Is there a way to match single bit (two bits, byte etc.) in a packet using iptables? (without queuing to userspace)

For example i'd like to match bit 41 in IP packet - reserved flag. or if bits 42 and 43 both are not set..

P.Krumins

#1 lore raw

I am also finding this feature. (I am trying to match on the ip fragmentation offset field.) I am wondering why iptables don't come up with a more 'generic' module to match any pattern in IP header using some kind of mask?

Any idea?

Regards,
philip

Quoted 10 lines · Peteris Krumins

Hello,

Is there a way to match single bit (two bits, byte etc.) in a packet using iptables? (without queuing to userspace)

For example i'd like to match bit 41 in IP packet - reserved flag. or if bits 42 and 43 both are not set..

P.Krumins