diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2012-11-05 00:28:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-16 01:47:40 -0500 |
commit | 130cd273d4a46a3011b1cc739f5d2af78779d666 (patch) | |
tree | 508374445793be54ac9ee9a4d9b1bda24aa4beb5 /include | |
parent | d4d0d3557b4d6ee735fbec275803d637ee26b42d (diff) |
ipv6: export IP6_RT_PRIO_* to userland
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ip6_route.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/ipv6_route.h | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 5fa2af00634a..27d83183e615 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _NET_IP6_ROUTE_H | 1 | #ifndef _NET_IP6_ROUTE_H |
2 | #define _NET_IP6_ROUTE_H | 2 | #define _NET_IP6_ROUTE_H |
3 | 3 | ||
4 | #define IP6_RT_PRIO_USER 1024 | ||
5 | #define IP6_RT_PRIO_ADDRCONF 256 | ||
6 | |||
7 | struct route_info { | 4 | struct route_info { |
8 | __u8 type; | 5 | __u8 type; |
9 | __u8 length; | 6 | __u8 length; |
diff --git a/include/uapi/linux/ipv6_route.h b/include/uapi/linux/ipv6_route.h index 0459664c2636..2be7bd174751 100644 --- a/include/uapi/linux/ipv6_route.h +++ b/include/uapi/linux/ipv6_route.h | |||
@@ -55,4 +55,7 @@ struct in6_rtmsg { | |||
55 | #define RTMSG_NEWROUTE 0x21 | 55 | #define RTMSG_NEWROUTE 0x21 |
56 | #define RTMSG_DELROUTE 0x22 | 56 | #define RTMSG_DELROUTE 0x22 |
57 | 57 | ||
58 | #define IP6_RT_PRIO_USER 1024 | ||
59 | #define IP6_RT_PRIO_ADDRCONF 256 | ||
60 | |||
58 | #endif /* _UAPI_LINUX_IPV6_ROUTE_H */ | 61 | #endif /* _UAPI_LINUX_IPV6_ROUTE_H */ |