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/net/pf_table.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/net/pf_table.c')
-rw-r--r-- | sys/net/pf_table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pf_table.c b/sys/net/pf_table.c index eebe03bcb7e..207a4f5a6c9 100644 --- a/sys/net/pf_table.c +++ b/sys/net/pf_table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_table.c,v 1.72 2007/12/20 20:07:41 reyk Exp $ */ +/* $OpenBSD: pf_table.c,v 1.73 2008/05/07 05:14:21 claudio Exp $ */ /* * Copyright (c) 2002 Cedric Berger @@ -988,9 +988,9 @@ pfr_route_kentry(struct pfr_ktable *kt, struct pfr_kentry *ke) s = splsoftnet(); if (KENTRY_NETWORK(ke)) { pfr_prepare_network(&mask, ke->pfrke_af, ke->pfrke_net); - rn = rn_addroute(&ke->pfrke_sa, &mask, head, ke->pfrke_node); + rn = rn_addroute(&ke->pfrke_sa, &mask, head, ke->pfrke_node, 0); } else - rn = rn_addroute(&ke->pfrke_sa, NULL, head, ke->pfrke_node); + rn = rn_addroute(&ke->pfrke_sa, NULL, head, ke->pfrke_node, 0); splx(s); return (rn == NULL ? -1 : 0); |