From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH 1/1] tc: filter: fix default 'protocol all' on little-endian platforms
Date: Wed, 27 Jul 2011 18:47:05 +0200 [thread overview]
Message-ID: <1311785225-23367-1-git-send-email-fw@strlen.de> (raw)
when specifiying filters without 'protocol' keyword, tc will
default to 'protocol all'.
Unfortunately, this missed a byte-ordering conversion.
---
tc/tc_filter.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tc/tc_filter.c b/tc/tc_filter.c
index 919c57c..4e55812 100644
--- a/tc/tc_filter.c
+++ b/tc/tc_filter.c
@@ -73,7 +73,7 @@ int tc_filter_modify(int cmd, unsigned flags, int argc, char **argv)
req.t.tcm_family = AF_UNSPEC;
if (cmd == RTM_NEWTFILTER && flags & NLM_F_CREATE)
- protocol = ETH_P_ALL;
+ protocol = htons(ETH_P_ALL);
while (argc > 0) {
if (strcmp(*argv, "dev") == 0) {
--
1.7.3.4
reply other threads:[~2011-07-27 16:48 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=1311785225-23367-1-git-send-email-fw@strlen.de \
--to=fw@strlen.de \
--cc=netdev@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).