From: Claudio Jeker Subject: bgpd: change config syntax for extended message support To: tech@openbsd.org Date: Thu, 9 Jan 2025 16:29:38 +0100 That was dumb of me. I added RFC 8654 extended message support as 'announce extended yes' but now RFC 8950 'extended nexthop encoding' wants some extended as well. So adjust the config to 'announce extended message yes' and then we can use 'announce extended nexthop yes' for RFC 8950. -- :wq Claudio Index: bgpd.conf.5 =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/bgpd.conf.5,v diff -u -p -r1.246 bgpd.conf.5 --- bgpd.conf.5 7 Jan 2025 12:11:45 -0000 1.246 +++ bgpd.conf.5 9 Jan 2025 15:14:50 -0000 @@ -1103,7 +1103,7 @@ The default is .Ic no . .Pp .It Xo -.Ic announce extended +.Ic announce extended message .Pq Ic yes Ns | Ns Ic no Ns | Ns Ic enforce .Xc If set to Index: parse.y =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v diff -u -p -r1.474 parse.y --- parse.y 14 Dec 2024 21:24:31 -0000 1.474 +++ parse.y 9 Jan 2025 15:15:31 -0000 @@ -249,7 +249,7 @@ typedef struct { %token FLOWSPEC PROTO FLAGS FRAGMENT TOS LENGTH ICMPTYPE CODE %token LOCALAS REMOTEAS DESCR LOCALADDR MULTIHOP PASSIVE MAXPREFIX RESTART %token ANNOUNCE REFRESH AS4BYTE CONNECTRETRY ENHANCED ADDPATH EXTENDED -%token SEND RECV PLUS POLICY ROLE GRACEFUL NOTIFICATION +%token SEND RECV PLUS POLICY ROLE GRACEFUL NOTIFICATION MESSAGE %token DEMOTE ENFORCE NEIGHBORAS ASOVERRIDE REFLECTOR DEPEND DOWN %token DUMP IN OUT SOCKET RESTRICTED %token LOG TRANSPARENT FILTERED @@ -2030,8 +2030,8 @@ peeropts : REMOTEAS as4number { | ANNOUNCE POLICY yesnoenforce { curpeer->conf.capabilities.policy = $3; } - | ANNOUNCE EXTENDED yesnoenforce { - curpeer->conf.capabilities.ext_msg = $3; + | ANNOUNCE EXTENDED MESSAGE yesnoenforce { + curpeer->conf.capabilities.ext_msg = $4; } | ROLE STRING { if (strcmp($2, "provider") == 0) { @@ -3596,6 +3596,7 @@ lookup(char *s) { "maxlen", MAXLEN }, { "md5sig", MD5SIG }, { "med", MED }, + { "message", MESSAGE }, { "metric", METRIC }, { "min", YMIN }, { "min-version", MINVERSION }, Index: printconf.c =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/printconf.c,v diff -u -p -r1.178 printconf.c --- printconf.c 13 Dec 2024 19:21:03 -0000 1.178 +++ printconf.c 9 Jan 2025 15:15:51 -0000 @@ -969,9 +969,9 @@ print_announce(struct peer_config *p, co printf("%s\tannounce as4byte no\n", c); if (p->capabilities.ext_msg == 2) - printf("%s\tannounce extended enforce\n", c); + printf("%s\tannounce extended message enforce\n", c); else if (p->capabilities.ext_msg == 1) - printf("%s\tannounce extended yes\n", c); + printf("%s\tannounce extended message yes\n", c); if (p->capabilities.add_path[AID_MIN] & CAPA_AP_RECV_ENFORCE) printf("%s\tannounce add-path recv enforce\n", c);