Dumb copy paste error. The add-path capability is 4byte per AFI/SAFI the 2 + is from graceful restart where two extra bytes are at the front of the AFI/SAFI list.
-- :wq Claudio Index: session.c =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/session.c,v retrieving revision 1.421 diff -u -p -r1.421 session.c --- session.c 17 Jun 2021 16:05:26 -0000 1.421 +++ session.c 22 Jun 2021 11:50:08 -0000 @@ -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++) {