From 35b9b084be8fdfcefdb52eafb387e2a7cba96c01 Mon Sep 17 00:00:00 2001 From: martijn Date: Mon, 18 Dec 2023 16:56:01 +0000 Subject: [PATCH] Fix copy-paste error for setting source-address in trap receiver. OK jca@ --- usr.sbin/snmpd/parse.y | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y index 8492775573c..002d8aaf670 100644 --- a/usr.sbin/snmpd/parse.y +++ b/usr.sbin/snmpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.83 2023/11/21 08:47:04 martijn Exp $ */ +/* $OpenBSD: parse.y,v 1.84 2023/12/18 16:56:01 martijn Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter @@ -1033,8 +1033,9 @@ hostdef : STRING hostoid hostauth srcaddr { free($1); memcpy(&(tr->ta_ss), &ss, sizeof(ss)); if ($4 != NULL) { - if (host($1, "0", SOCK_DGRAM, &ss, 1) <= 0) { - yyerror("invalid host: %s", $1); + if (host($4, "0", SOCK_DGRAM, &ss, 1) <= 0) { + yyerror("invalid source-address: %s", + $4); free($2); free($3.data); free($4); -- 2.20.1