aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-04-09 14:42:25 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-09 16:31:13 -0400
commitbb8a954f27ed8fb8f57e80e6b63d837cfdcad689 (patch)
tree3b001cd05b981c38ccd31f088fb434b492301e56 /net/sched
parent90f30eccf41302a2542f5d374af243061902bd98 (diff)
[NET_SCHED]: cls_tcindex: fix compatibility breakage
Userspace uses an integer for TCA_TCINDEX_SHIFT, the kernel was changed to expect and use a u16 value in 2.6.11, which broke compatibility on big endian machines. Change back to use int. Reported by Ole Reinartz <ole.reinartz@gmx.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_tcindex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 040e2d2d281a..7563fdcef4b7 100644
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -245,9 +245,9 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
245 } 245 }
246 246
247 if (tb[TCA_TCINDEX_SHIFT-1]) { 247 if (tb[TCA_TCINDEX_SHIFT-1]) {
248 if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(u16)) 248 if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(int))
249 goto errout; 249 goto errout;
250 cp.shift = *(u16 *) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]); 250 cp.shift = *(int *) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]);
251 } 251 }
252 252
253 err = -EBUSY; 253 err = -EBUSY;