提交 658270a0 编写于 作者: K Kim Nordlund 提交者: David S. Miller

[PKT_SCHED] cls_basic: Use unsigned int when generating handle

Prevents filters from being added if the first generated
handle already exists.
Signed-off-by: NKim Nordlund <kim.nordlund@nokia.com>
Signed-off-by: NThomas Graf <tgraf@suug.ch>
上级 c9aa6895
...@@ -194,7 +194,7 @@ static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle, ...@@ -194,7 +194,7 @@ static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle,
if (handle) if (handle)
f->handle = handle; f->handle = handle;
else { else {
int i = 0x80000000; unsigned int i = 0x80000000;
do { do {
if (++head->hgenerator == 0x7FFFFFFF) if (++head->hgenerator == 0x7FFFFFFF)
head->hgenerator = 1; head->hgenerator = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册