netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alvaro Neira Ayuso <alvaroneay@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [nftables PATCH 0/2] Add DSCP and TOS support
Date: Tue, 27 May 2014 11:58:42 +0200	[thread overview]
Message-ID: <1401184722-13929-1-git-send-email-alvaroneay@gmail.com> (raw)

The following patchset contains nftables updates:

1) Add support for using TOS symbols when we add rules that we use TOS. Before,
we have added the rules with TOS mask and we didn't have support for adding
the rules with symbols.

2) Add support for using DSCP in Nftables. With this patch, we allow to use
DSCP in nftables. With this two patchs, we have retrocompatibility with TOS and
we have DSCP support.

3) We can add rules with TOS, but when we list the rules in nftables, the
position in the Ip header of TOS and DSCP is the same (but different structure)
and we must to decide in which format we want to list the rules. I have decided
to put the IPHDR_DSCP value before of IPHDR_TOS. With that we list the rules
with nftables, we will see the rules in format DSCP. I have decided that because
DSCP is more current and we still have retrocompatibility with TOS. Example:

If we add this rule:

nft add rule ip filter input ip tos 0x00 counter accept

or

nft add rule ip filter input ip tos normal-service counter accept

If we list the table filter. We will see:

ip dscp CS0 counter packets 0 bytes 0 accept.

Álvaro Neira Ayuso (2):
  src: Add support for adding TOS symbols
  src: Add DSCP support in nftables

 include/datatype.h |    4 ++
 include/proto.h    |    1 +
 src/parser.y       |    2 +
 src/proto.c        |  133 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 src/scanner.l      |    1 +
 5 files changed, 140 insertions(+), 1 deletion(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

                 reply	other threads:[~2014-05-27  9:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1401184722-13929-1-git-send-email-alvaroneay@gmail.com \
    --to=alvaroneay@gmail.com \
    --cc=netfilter-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).