Re: bgpd fix add-path capability encoding

2021-06-24 Thread Sebastian Benoit
Claudio Jeker(cje...@diehard.n-r-g.com) on 2021.06.22 19:47:04 +0200:
> 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.

ok.

> 
> -- 
> :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 -  1.421
> +++ session.c 22 Jun 2021 11:50:08 -
> @@ -1470,9 +1470,9 @@ session_open(struct peer *p)
>   u_int8_taplen;
>  
>   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++) {
> 



bgpd fix add-path capability encoding

2021-06-22 Thread Claudio Jeker
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 -  1.421
+++ session.c   22 Jun 2021 11:50:08 -
@@ -1470,9 +1470,9 @@ session_open(struct peer *p)
u_int8_taplen;
 
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++) {