-/* $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>
;
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;
$$.s_addr = htonl($1);
}
| STRING {
- if (inet_aton($1, &$$) == 0) {
+ if (inet_pton(AF_INET, $1, &$$) != 1) {
yyerror("error parsing area");
free($1);
YYERROR;