diff options
author | Patrick McHardy <kaber@trash.net> | 2007-04-13 21:34:16 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-04-13 22:58:27 +0200 |
commit | 51e4ab6cf5eb8c000ef61fa862a6b610a5d2189d (patch) | |
tree | f7c33086066b182aae85ff7500f90234aa6e1582 | |
parent | ef846bc01da49cf63d289e97139bef5181e75229 (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>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r-- | net/sched/cls_tcindex.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c index 9f921174c8ab..d8f8ad269a4c 100644 --- a/net/sched/cls_tcindex.c +++ b/net/sched/cls_tcindex.c @@ -247,9 +247,9 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle, } if (tb[TCA_TCINDEX_SHIFT-1]) { - if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(u16)) + if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(int)) goto errout; - cp.shift = *(u16 *) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]); + cp.shift = *(int *) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]); } err = -EBUSY; |