From ec5c1b1b77e79719850becc98cfb943733fd785f Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Wed, 18 Mar 2009 19:39:28 +0000 Subject: 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. --- usr.sbin/bgpd/session.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'usr.sbin') 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 @@ -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 -- cgit v1.2.3