From: claudio Date: Fri, 27 Oct 2023 09:40:27 +0000 (+0000) Subject: The holdtime is added to the ibuf with ibuf_add_n16() so no need to X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=64ccb183418759eed0244f4fb60c387dec6145b5;p=openbsd The holdtime is added to the ibuf with ibuf_add_n16() so no need to htons() the value before. OK tb@ --- diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index f3fbc3b051a..5db8ebb1016 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.451 2023/10/19 07:02:45 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.452 2023/10/27 09:40:27 claudio Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -1572,9 +1572,9 @@ session_open(struct peer *p) } if (p->conf.holdtime) - holdtime = htons(p->conf.holdtime); + holdtime = p->conf.holdtime; else - holdtime = htons(conf->holdtime); + holdtime = conf->holdtime; errs += ibuf_add_n8(buf->buf, 4); errs += ibuf_add_n16(buf->buf, p->conf.local_short_as);