[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAEzD07LUMu+SEy7YM=Wi=ZEihE6SWZxbh3qjUCYBxFGiC40uwA@mail.gmail.com>
Date: Wed, 29 Feb 2012 19:45:07 +0300
From: "Anton 'EvilMan' Danilov" <littlesmilingcloud@...il.com>
To: netdev@...r.kernel.org
Subject: [PATCH] tc action: pedit, fix header offset calculation
This patch fix header offset calculation in pedit action.
Header offset feature can be used for calculation offset of next
header, if options is presented in ipv4 header.
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 10d3aed..4678a77 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -151,7 +151,7 @@ static int tcf_pedit(struct sk_buff *skb, const
struct tc_action *a,
&_d);
if (!d)
goto bad;
- offset += (*d & tkey->offmask) >> tkey->shift;
+ offset += ntohl(*d & tkey->offmask) >> tkey->shift;
}
if (offset % 4) {
--
Anton.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists