* [PATCH 1/1] tc: filter: fix default 'protocol all' on little-endian platforms
@ 2011-07-27 16:47 Florian Westphal
0 siblings, 0 replies; only message in thread
From: Florian Westphal @ 2011-07-27 16:47 UTC (permalink / raw)
To: netdev; +Cc: Florian Westphal
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-27 16:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-27 16:47 [PATCH 1/1] tc: filter: fix default 'protocol all' on little-endian platforms Florian Westphal
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).