Skip to content

Commit

Permalink
ipv6: export IP6_RT_PRIO_* to userland
Browse files Browse the repository at this point in the history
The kernel uses some default metric when routes are managed. For example, a
static route added with a metric set to 0 is inserted in the kernel with
metric 1024 (IP6_RT_PRIO_USER).
It is useful for routing daemons to know these values, to be able to set routes
without interfering with what the kernel does.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nicolas Dichtel authored and David S. Miller committed Nov 16, 2012
1 parent d4d0d35 commit 130cd27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions include/net/ip6_route.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#ifndef _NET_IP6_ROUTE_H
#define _NET_IP6_ROUTE_H

#define IP6_RT_PRIO_USER 1024
#define IP6_RT_PRIO_ADDRCONF 256

struct route_info {
__u8 type;
__u8 length;
Expand Down
3 changes: 3 additions & 0 deletions include/uapi/linux/ipv6_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ struct in6_rtmsg {
#define RTMSG_NEWROUTE 0x21
#define RTMSG_DELROUTE 0x22

#define IP6_RT_PRIO_USER 1024
#define IP6_RT_PRIO_ADDRCONF 256

#endif /* _UAPI_LINUX_IPV6_ROUTE_H */

0 comments on commit 130cd27

Please sign in to comment.