diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-05-07 05:14:22 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-05-07 05:14:22 +0000 |
commit | 65a24792bc9ddbf77a4e57b878d5ef077e00c636 (patch) | |
tree | 0c6cf6f9387b3857646bfe438b8fda70d8d0d04f /sys/netinet6/in6.c | |
parent | d6464b531ebfbeadcd02daad12fb3e500888ad9a (diff) |
Implement routing priorities. Every route inserted has a priority assigned
and the one route with the lowest number wins. This will be used by the
routing daemons to resolve the synchronisations issue in case of conflicts.
The nasty bits of this are in the multipath code. If no priority is specified
the kernel will choose an appropriate priority.
Looked at by a few people at n2k8 code is much older
Diffstat (limited to 'sys/netinet6/in6.c')
-rw-r--r-- | sys/netinet6/in6.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 94f00a193a5..27015a5ce96 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.73 2007/12/09 21:24:58 hshoexer Exp $ */ +/* $OpenBSD: in6.c,v 1.74 2008/05/07 05:14:21 claudio Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -1105,7 +1105,8 @@ in6_update_ifa(ifp, ifra, ia) (struct sockaddr *)&ia->ia_addr; /* XXX: we need RTF_CLONING to fake nd6_rtrequest */ info.rti_flags = RTF_UP | RTF_CLONING; - error = rtrequest1(RTM_ADD, &info, NULL, 0); + error = rtrequest1(RTM_ADD, &info, RTP_CONNECTED, NULL, + 0); if (error) goto cleanup; } else { @@ -1173,7 +1174,8 @@ in6_update_ifa(ifp, ifra, ia) info.rti_info[RTAX_IFA] = (struct sockaddr *)&ia->ia_addr; info.rti_flags = RTF_UP | RTF_CLONING; - error = rtrequest1(RTM_ADD, &info, NULL, 0); + error = rtrequest1(RTM_ADD, &info, RTP_CONNECTED, + NULL, 0); if (error) goto cleanup; } else { |