Download raw body.
bgpd: properly handle named ports
It is possible to use ports by name, bgpd will then call getservice() which is a wrapper around getservbyname(). The problem is that s->s_port returned by getservbyname() is in network byte order but the code around this expects it to be host byte order. So lets add a ntohs() here. -- :wq Claudio Index: parse.y =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v diff -u -p -r1.493 parse.y --- parse.y 11 May 2026 18:41:06 -0000 1.493 +++ parse.y 12 May 2026 14:46:44 -0000 @@ -5625,7 +5625,7 @@ getservice(char *n) s = getservbyname(n, "udp"); if (s == NULL) return -1; - return s->s_port; + return ntohs(s->s_port); } static int
bgpd: properly handle named ports