netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: export IP6_RT_PRIO_* to userland
@ 2012-11-05 15:28 Nicolas Dichtel
  2012-11-05 17:00 ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Dichtel @ 2012-11-05 15:28 UTC (permalink / raw)
  To: netdev; +Cc: davem, Nicolas Dichtel

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>
---
 include/net/ip6_route.h         | 3 ---
 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 5fa2af0..27d8318 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -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;
diff --git a/include/uapi/linux/ipv6_route.h b/include/uapi/linux/ipv6_route.h
index 0459664..2be7bd1 100644
--- a/include/uapi/linux/ipv6_route.h
+++ b/include/uapi/linux/ipv6_route.h
@@ -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 */
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-11-16  6:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-05 15:28 [PATCH net-next] ipv6: export IP6_RT_PRIO_* to userland Nicolas Dichtel
2012-11-05 17:00 ` David Miller
2012-11-05 17:22   ` Nicolas Dichtel
2012-11-05 17:43     ` David Miller
2012-11-05 19:24       ` Nicolas Dichtel
2012-11-09  9:43         ` Nicolas Dichtel
2012-11-09 19:05           ` David Miller
2012-11-16  6:48         ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).