diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-07-28 16:02:15 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-07-28 16:02:15 +0000 |
commit | 13285dc3dbfd6bb612fffa9c3c22f1ee25391384 (patch) | |
tree | d8f565ae22cbf9a26e438f7fa8d0031524e8d21e /usr.sbin/bgpd | |
parent | 3196515d0cf5bd8616e8238b0d6e08a5b4d79fd8 (diff) |
The default localpreference is 100 and not 0. Found and ok henning@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde.h | 4 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_attr.c | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 17653f5d49f..8217c560bcf 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.127 2004/07/13 17:57:20 jaredy Exp $ */ +/* $OpenBSD: rde.c,v 1.128 2004/07/28 16:02:14 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1477,7 +1477,7 @@ network_add(struct network_config *nc, int flagstatic) attrs.aspath = aspath_create(NULL, 0); attrs.nexthop.s_addr = INADDR_ANY; /* med = 0 */ - /* lpref = 0 */ + attrs.lpref = DEFAULT_LPREF; attrs.origin = ORIGIN_IGP; TAILQ_INIT(&attrs.others); diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h index e54166bf188..edee7b77d54 100644 --- a/usr.sbin/bgpd/rde.h +++ b/usr.sbin/bgpd/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.45 2004/07/13 17:57:20 jaredy Exp $ */ +/* $OpenBSD: rde.h,v 1.46 2004/07/28 16:02:14 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and @@ -127,6 +127,8 @@ TAILQ_HEAD(attr_list, attr); #define ORIGIN_EGP 1 #define ORIGIN_INCOMPLETE 2 +#define DEFAULT_LPREF 100 + struct attr_flags { struct aspath *aspath; struct in_addr nexthop; /* exit nexthop */ diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c index d20d072f5f4..84d0007b23a 100644 --- a/usr.sbin/bgpd/rde_attr.c +++ b/usr.sbin/bgpd/rde_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_attr.c,v 1.38 2004/07/13 17:57:20 jaredy Exp $ */ +/* $OpenBSD: rde_attr.c,v 1.39 2004/07/28 16:02:14 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -58,6 +58,7 @@ attr_init(struct attr_flags *a) { bzero(a, sizeof(struct attr_flags)); a->origin = ORIGIN_INCOMPLETE; + a->lpref = DEFAULT_LPREF; TAILQ_INIT(&a->others); } |