diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2024-08-21 15:18:48 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2024-08-21 15:18:48 +0000 |
commit | 14e844220d696a32f83ea1bf8046582b8af6cae4 (patch) | |
tree | 1018f1372eba4d692c39d92e6e148e78c8629520 /usr.sbin/ospf6d | |
parent | 19f1c58779f32c1426ee7cb01dc7e27843c05c58 (diff) |
An area is either a decimal number or an IPv4 address.
This lets us replace inet_aton with inet_pton since we do not need
inet_aton's flexibility.
phessler, sthen and Tom Smyth all confirm that they never came across
a different way of specifying an area.
OK claudio, deraadt
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r-- | usr.sbin/ospf6d/parse.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ospf6d/parse.y b/usr.sbin/ospf6d/parse.y index bbf2ca17b21..b25e030124c 100644 --- a/usr.sbin/ospf6d/parse.y +++ b/usr.sbin/ospf6d/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.52 2023/07/04 02:56:11 dlg Exp $ */ +/* $OpenBSD: parse.y,v 1.53 2024/08/21 15:18:47 florian Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -211,7 +211,7 @@ varset : STRING '=' string { ; conf_main : ROUTERID STRING { - if (!inet_aton($2, &conf->rtr_id)) { + if (inet_pton(AF_INET, $2, &conf->rtr_id) != 1) { yyerror("error parsing router-id"); free($2); YYERROR; @@ -489,7 +489,7 @@ areaid : NUMBER { $$.s_addr = htonl($1); } | STRING { - if (inet_aton($1, &$$) == 0) { + if (inet_pton(AF_INET, $1, &$$) != 1) { yyerror("error parsing area"); free($1); YYERROR; |