-/* $OpenBSD: parser.c,v 1.136 2024/08/21 09:17:05 florian Exp $ */
+/* $OpenBSD: parser.c,v 1.137 2024/08/22 08:17:54 florian Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
*v = uval | (uvalh << 16);
break;
case EXT_COMMUNITY_TRANS_IPV4:
- if (inet_pton(AF_INET, s, &ip) == 0)
+ if (inet_pton(AF_INET, s, &ip) != 1)
errx(1, "Bad ext-community %s not parseable", s);
*v = ntohl(ip.s_addr);
break;
-/* $OpenBSD: parse.y,v 1.466 2024/08/21 09:17:05 florian Exp $ */
+/* $OpenBSD: parse.y,v 1.467 2024/08/22 08:17:54 florian Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
*v = uval | (uvalh << 16);
break;
case EXT_COMMUNITY_TRANS_IPV4:
- if (inet_pton(AF_INET, s, &ip) == 0) {
+ if (inet_pton(AF_INET, s, &ip) != 1) {
yyerror("Bad ext-community %s not parseable", s);
return (-1);
}
-/* $OpenBSD: parse.y,v 1.33 2024/08/21 09:20:36 florian Exp $ */
+/* $OpenBSD: parse.y,v 1.34 2024/08/22 08:17:54 florian Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
;
conf_main : ROUTERID STRING {
- if (!inet_pton(AF_INET, $2, &conf->rtr_id)) {
+ if (inet_pton(AF_INET, $2, &conf->rtr_id) != 1) {
yyerror("error parsing router-id");
free($2);
YYERROR;
-/* $OpenBSD: parse.y,v 1.73 2024/08/21 09:17:56 florian Exp $ */
+/* $OpenBSD: parse.y,v 1.74 2024/08/22 08:17:54 florian Exp $ */
/*
* Copyright (c) 2013, 2015, 2016 Renato Westphal <renato@openbsd.org>
;
routerid : STRING {
- if (!inet_pton(AF_INET, $1, &$$)) {
+ if (inet_pton(AF_INET, $1, &$$) != 1) {
yyerror("%s: error parsing router id", $1);
free($1);
YYERROR;