Bug 197897

Summary: iproute2: make ip route list to search by metric too
Product: Networking Reporter: Alexander Zubkov (zubkov318)
Component: OtherAssignee: Stephen Hemminger (stephen)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: any Subsystem:
Regression: No Bisected commit-id:
Attachments: proposed patch

Description Alexander Zubkov 2017-11-16 20:05:11 UTC
Hello.

Currently routes in the Linux routing table have these "key" fields: prefix, tos, table, metric (as I know). I.e. we can not have two different routes with the same set of this fields. And "ip route list" command can be all but one of those fields. We cannot pass metric to it and this is inconvenient. I ask if this behaviour can be changed by someone. We can even use "secondary" fields, for example type, dev or via, but not metric unfortunately.
Comment 1 Stephen Hemminger 2017-11-17 00:15:11 UTC
Patches accepted. Please forward to netdev@vger.kernel.org
Comment 2 Alexander Zubkov 2017-11-18 13:19:04 UTC
Created attachment 260713 [details]
proposed patch

Attaching patch.
And I posted the question to the mailing list too.
Comment 3 Alexander Zubkov 2018-01-02 15:18:36 UTC
I think this could be closed as patches have been merged already.