diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-19 14:23:29 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-19 14:23:29 +0000 |
commit | 270d6430c5cc4070dc647e4c01d87cf206f19fde (patch) | |
tree | 685ef3465fc08bafe60a3a0ed06b4b253462295c /usr.sbin/bgpd | |
parent | a83fe170f560b71aeef197ba5c229e27020dbcdb (diff) |
for our internal peer ID just use the peer's IP address for now.
this collides with multiviews (which we don't have yet) and will have to
be changed then, but allows us to progress much faster now.
ok claudio@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/config.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/config.c b/usr.sbin/bgpd/config.c index 32b65d50e0b..2e008b19fc3 100644 --- a/usr.sbin/bgpd/config.c +++ b/usr.sbin/bgpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.1 2003/12/17 11:46:54 henning Exp $ */ +/* $OpenBSD: config.c,v 1.2 2003/12/19 14:23:28 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -28,7 +28,6 @@ #include "bgpd.h" void *sconf; -static u_int32_t max_id = 1; /* reserve 0 */ u_int32_t get_bgpid(void); u_int32_t get_id(struct peer *); @@ -118,5 +117,8 @@ get_bgpid(void) u_int32_t get_id(struct peer *p) { - return (max_id++); + /* + * XXX this collides with multiviews and will need more clue later XXX + */ + return (ntohl(p->conf.remote_addr.sin_addr.s_addr)); } |