summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-03-18 19:39:28 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-03-18 19:39:28 +0000
commitec5c1b1b77e79719850becc98cfb943733fd785f (patch)
tree88bc84efb06425e880d8856354138c1ade1721f7 /usr.sbin/bgpd
parentd9e6dd11fb7d655e11e92e02f8f899b4e7b9c36a (diff)
short_as is always initialised to the 16bit AS that is used. So no need
use conf->as as source for > 16bit AS numbers. OK henning.
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/session.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index ee91f094b8e..d3511529bad 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.286 2009/03/13 05:43:51 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.287 2009/03/18 19:39:27 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -1390,10 +1390,7 @@ session_open(struct peer *p)
}
msg.version = 4;
- if (conf->as > USHRT_MAX)
- msg.myas = htons(conf->short_as);
- else
- msg.myas = htons(conf->as);
+ msg.myas = htons(conf->short_as);
if (p->conf.holdtime)
msg.holdtime = htons(p->conf.holdtime);
else