From 85e53d51f723112b44075c658431d9700facd4c0 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 3 Feb 2010 20:05:09 +0100 Subject: zebra: NetBSD: get IPSRCSEL preference value from kernel fetch the address preference value from the kernel through SIOCGIFADDRPREF and pass it to quagga through connected_add_ipv4, which stores it in struct connected->preference. IPSRCSEL is a NetBSD kernel option(4), documented in in_getifa(9) and is available since NetBSD 4.0 but not enabled in default GENERIC. --- zebra/connected.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'zebra/connected.c') diff --git a/zebra/connected.c b/zebra/connected.c index 82c531e4..0c22582d 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -269,7 +269,7 @@ connected_up_ipv4 (struct interface *ifp, struct connected *ifc) void connected_add_ipv4 (struct interface *ifp, int flags, struct in_addr *addr, u_char prefixlen, struct in_addr *broad, - const char *label, unsigned scope) + const char *label, unsigned scope, int preference) { struct prefix_ipv4 *p; struct connected *ifc; @@ -342,6 +342,7 @@ connected_add_ipv4 (struct interface *ifp, int flags, struct in_addr *addr, ifc->label = XSTRDUP (MTYPE_CONNECTED_LABEL, label); ifc->scope = scope; + ifc->preference = preference; /* nothing to do? */ if ((ifc = connected_implicit_withdraw (ifp, ifc)) == NULL) -- cgit v1.2.3