All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Graf <tgr@reeler.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] ACK matching
Date: Tue, 21 May 2002 20:42:53 +0000	[thread overview]
Message-ID: <marc-lartc-102201387000926@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102201284932330@msgid-missing>

hi

* he@fli4l.de wrote:
> in the LARTC-HowTo is an example given for matching packets with the
> ACK-bit set.
> 
> Does "IP Total length 0x34 (ACK + 12 bytes of TCP options)" (from the
> HowTo) mean that you are just matching Packets with an ACK set but
> without any data? If I am right, this would mean that just
> Forward-Acknowledgements are matched, isn't it?

>tc filter add dev $DEV parent 1: protocol ip prio 12 u32 \
>   match ip protocol 6 0xff \

matches tcp

>   match u8 0x05 0x0f at 0 \

matches packets with IHL = 5 -> no ip options

>   match u16 0x0000 0xffc0 at 2 \

matches packets smaller than 64 byte. now we have
14 byte ethernet + 20 byte ip + ~20 bytes tcp header
makes 56 byte headers, so there is not much free space
for payload

>  match u8 0x10 0xff at 33 \

matches the ACK bit

>   flowid 1:10

now, cause almost all packets have the ACK bit set this rule
matches all small packets with no ip options. it could be
done better with nexthdr to match packets with ip options
set too.

> What about matching ACKs with iptables, is it possible to mark Packets
> with ACK set but without data?

Doesnt make much sense, because every packet except a few during
handshake at begin and end have the ACK bit set. Actually, packets
with only ACK set and no payload are rare.

-- 
Thomas Graf
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  reply	other threads:[~2002-05-21 20:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-21 20:26 [LARTC] ACK matching Hannes Ebner
2002-05-21 20:42 ` Thomas Graf [this message]
2002-05-21 21:29 ` Hannes Ebner
2002-05-22 22:16 ` Thomas Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-102201387000926@msgid-missing \
    --to=tgr@reeler.org \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.