Handle RTAMetrics properly
This commit is contained in:
@@ -16,10 +16,10 @@ pp rt.links["eth0"]
|
||||
puts "\nAddresses on interface eth0:"
|
||||
pp rt.addrs.list(:index=>"eth0").to_a
|
||||
|
||||
puts "\nAll v4 routes in main routing table:"
|
||||
pp rt.routes.list(:family=>Socket::AF_INET, :table=>Netlink::RT_TABLE_MAIN).to_a
|
||||
puts "\nAll routes in main routing table:"
|
||||
pp rt.routes.list(:table=>Netlink::RT_TABLE_MAIN).to_a
|
||||
|
||||
puts "\nDefault route is probably:"
|
||||
puts "\nV4 default route is probably:"
|
||||
pp rt.routes.list(:family=>Socket::AF_INET, :table=>Netlink::RT_TABLE_MAIN).
|
||||
min_by { |route| route.dst_len }
|
||||
|
||||
|
Reference in New Issue
Block a user