summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-05-03 23:41:18 +0200
committerDavid S. Miller <davem@davemloft.net>2005-05-03 23:41:18 +0200
commit9dfa277f88388a94993b121db46b80df66f48d9e (patch)
treeeb6159dc5d7b1d4a5f8c9455e34fdfc8549f33e4 /include/net
parent[PKT_SCHED]: HTB: Drop packet when direct queue is full (diff)
downloadlinux-9dfa277f88388a94993b121db46b80df66f48d9e.tar.xz
linux-9dfa277f88388a94993b121db46b80df66f48d9e.zip
[PKT_SCHED]: Fix range in PSCHED_TDIFF_SAFE to 0..bound
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/pkt_sched.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 7352e455053c..fcb05a387dbe 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -157,7 +157,8 @@ psched_tod_diff(int delta_sec, int bound)
case 1: \
__delta += 1000000; \
case 0: \
- __delta = abs(__delta); \
+ if (__delta > bound || __delta < 0) \
+ __delta = bound; \
} \
__delta; \
})