diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2024-08-21 09:17:06 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2024-08-21 09:17:06 +0000 |
commit | 01deef377ce95a2097dc89849a16a0646fa87d57 (patch) | |
tree | e39ba16da4f92e5b488b439f85df11af8c513184 /usr.sbin/bgpctl | |
parent | 62468e545cf5527504d829cbc5e82bd3c9e36a79 (diff) |
Use inet_pton to parse ext-communities with an IPv4 address.
No need for inet_aton's flexibility.
OK claudio
Diffstat (limited to 'usr.sbin/bgpctl')
-rw-r--r-- | usr.sbin/bgpctl/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index 7654051b8b1..ee86917744d 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.135 2024/08/14 19:10:51 claudio Exp $ */ +/* $OpenBSD: parser.c,v 1.136 2024/08/21 09:17:05 florian Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1325,7 +1325,7 @@ parseextvalue(int type, char *s, uint32_t *v, uint32_t *flag) *v = uval | (uvalh << 16); break; case EXT_COMMUNITY_TRANS_IPV4: - if (inet_aton(s, &ip) == 0) + if (inet_pton(AF_INET, s, &ip) == 0) errx(1, "Bad ext-community %s not parseable", s); *v = ntohl(ip.s_addr); break; |