From 13c74c40774c4259f8a61626ec62e0be40cfa7f8 Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 24 Jun 2021 09:26:18 +0000 Subject: [PATCH] Fix add-path capability encoding, the length was not correctly calculated because it included two extra bytes (copy-paste error from graceful restart). --- usr.sbin/bgpd/session.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 93debc14496..fe0dc69cf3e 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.421 2021/06/17 16:05:26 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.422 2021/06/24 09:26:18 claudio Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -1470,9 +1470,9 @@ session_open(struct peer *p) u_int8_t aplen; if (mpcapa) - aplen = 2 + 4 * mpcapa; + aplen = 4 * mpcapa; else /* AID_INET */ - aplen = 2 + 4; + aplen = 4; errs += session_capa_add(opb, CAPA_ADD_PATH, aplen); if (mpcapa) { for (i = AID_MIN; i < AID_MAX; i++) { -- 2.20.1