Bugs: Browse |
Download .csv
[#6380] Disconnect fails when interface traffic exceeds 2 GiB
Date: 2010-09-08 10:51 |
Priority: 3 |
Submitted By:
Pete Chapman (spanner)
|
Assigned To:
Aymeric Brisse (calvin_42) |
Summary: Disconnect fails when interface traffic exceeds 2 GiB |
Detailed description |
Once the interface has exceeded 2^31 bytes, the shell arithmetic in autodisconnect_runner_network can't keep up.
The line:
if [[ "$packets_after" -lt "$((packets_before+g_dontcountbytes))" ]]; then
wraps around, as an example (in ash), do:
bytes=2200000000; [[ "$bytes" -lt $((bytes + 2048)) ]] && echo "disconnect"
Attached is the patch I'm using (for v0.4.7) to work around this. It's a bit messy but I don't know any easy way to
do 64-bit arithmetic in a 32-bit shell (without invoking python!) |
|
|
Followup
Message |
Date: 2010-12-18 20:55
Sender: Aymeric Brisse
Fixed in 0.4.8 using bc (The GNU bc arbitrary precision calculator
language) |
|
|
Attached Files:
Name |
Download |
No Files Currently Attached |
|
|
Changes:
Field |
Old Value |
Date |
By |
Resolution | None | 2010-12-18 20:55 | calvin_42 |
close_date | 2010-12-18 20:55 | 2010-12-18 20:55 | calvin_42 |
status_id | Open | 2010-12-18 20:55 | calvin_42 |
assigned_to | none | 2010-10-25 09:49 | calvin_42 |
File Added | 877: overflow.patch | 2010-09-08 10:51 | spanner |
|
|
|