From: claudio Date: Mon, 30 Jan 2023 16:53:24 +0000 (+0000) Subject: Same parseextvalue() change as in parse.y rev 1.441 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5aca612e7b607af194a04393c27a85b7657e2404;p=openbsd Same parseextvalue() change as in parse.y rev 1.441 Use 2-byte ASnum encoding as a default when local-as/neighbor-as is used. --- diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index 1e467b314a0..c1069f9eb83 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.119 2023/01/24 14:14:15 claudio Exp $ */ +/* $OpenBSD: parser.c,v 1.120 2023/01/30 16:53:24 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -1232,11 +1232,11 @@ parseextvalue(int type, char *s, uint32_t *v, uint32_t *flag) } else if (strcmp(s, "neighbor-as") == 0) { *flag = COMMUNITY_NEIGHBOR_AS; *v = 0; - return EXT_COMMUNITY_TRANS_FOUR_AS; + return EXT_COMMUNITY_TRANS_TWO_AS; } else if (strcmp(s, "local-as") == 0) { *flag = COMMUNITY_LOCAL_AS; *v = 0; - return EXT_COMMUNITY_TRANS_FOUR_AS; + return EXT_COMMUNITY_TRANS_TWO_AS; } else if ((p = strchr(s, '.')) == NULL) { /* AS_PLAIN number (4 or 2 byte) */ strtonum(s, 0, USHRT_MAX, &errstr);