Bug 628739 - routes with negative metric
Summary: routes with negative metric
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: iproute
Version: 13
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Petr Šabata
QA Contact: Fedora Extras Quality Assurance
URL: http://marc.info/?l=linux-netdev&m=12...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-30 21:36 UTC by Curtis Doty
Modified: 2010-09-30 10:24 UTC (History)
3 users (show)

Fixed In Version: iproute-2.6.33-4.fc13
Clone Of:
Environment:
Last Closed: 2010-09-30 06:18:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Print route metric as unsigned int (700 bytes, patch)
2010-08-31 12:13 UTC, Petr Šabata
no flags Details | Diff

Description Curtis Doty 2010-08-30 21:36:09 UTC
I found this in f12 and tried posting this bug to the kernel netdev list http://marc.info/?l=linux-netdev&m=126823674823150 but got no reply. Maybe it's just a cosmetic issue in iproute2?

It's still in f13 and pretty easy to reproduce:

# ip route add 10.0.0.0/8 via 192.0.2.1 metric $[2**31]
# ip route show 10.0.0.0/8
10.0.0.0/8 via 192.0.2.1 dev eth4  metric -2147483648

Something is wrong somewhere with signedness. The highest metric that will display properly is one less:

# ip route add 10.0.0.0/8 via 192.0.2.1 metric $[2**31-1]
# ip route show 10.0.0.0/8
10.0.0.0/8 via 192.0.2.1 dev eth4  metric 2147483647

Are metrics with the 32nd bit set legit? Or should the tool prevent it like this:

# ip route add 10.0.0.0/8 via 192.0.2.1 metric $[2**32]  
Error: argument "4294967296" is wrong: "metric" value is invalid

Please forward to upstream contact if appropriate. Thanks!

Comment 1 Petr Šabata 2010-08-31 12:13:24 UTC
Created attachment 442167 [details]
Print route metric as unsigned int

This really seems to be a cosmetic issue.
Does the attached patch solve it for you?

Koji builds for testings:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2437127

Comment 2 Petr Šabata 2010-09-21 08:39:39 UTC
I suppose the printf patch solves the issue.

Comment 3 Fedora Update System 2010-09-21 08:49:05 UTC
iproute-2.6.33-4.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/iproute-2.6.33-4.fc13

Comment 4 Fedora Update System 2010-09-21 09:09:46 UTC
iproute-2.6.35-3.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/iproute-2.6.35-3.fc14

Comment 5 Fedora Update System 2010-09-21 18:17:00 UTC
iproute-2.6.35-3.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update iproute'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/iproute-2.6.35-3.fc14

Comment 6 Fedora Update System 2010-09-30 06:18:25 UTC
iproute-2.6.35-3.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2010-09-30 10:23:56 UTC
iproute-2.6.33-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.