Using netlink to set route metric (RTA_PRIORITY)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm working on a mobile mesh-networking router and I'd like to be able to modify
the hop-count assocated with a given route without having to do a delete
followed by add with the new hop-count.  Aside from the overhead of the extra
system-call the removal/addition of the route could unnecessarily trigger
callbacks in other processes monitoring the route table.

As far as I can tell this is not currently supported (I'm using kernel 2.6). 
For instance if I use "ip route add" to add a route and then "ip route change"
with a new metric I get the err: "RTNETLINK answers: No such device"

Looking through the kernel source code I think that a route is matched by
(tos,priority) as well as the prefix so that passing a new priority means that
no match is made to the route with the old priority:

http://lxr.linux.no/source/net/ipv4/fib_hash.c?v=2.6.10#L479

Am I missing soemthing obvious or is modification of a routes's priority field
through netlink not supported and if not should it be?  Is there a reason why 
an existing route should not have tos/priority changed?

Any help appreciated,
Aidan Doyle

--
Aidan Doyle, Sr. Member Technical Staff
Sensoria Corp.
Email: apdoyle@xxxxxxxxxxxx


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux