summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorMartijn van Duren <martijn@cvs.openbsd.org>2023-12-18 16:56:02 +0000
committerMartijn van Duren <martijn@cvs.openbsd.org>2023-12-18 16:56:02 +0000
commitcb90f576443f2ca71ffae44e237210693855c06e (patch)
tree2976f8124edd7b8a9b8525a8d420f50d6b4f838c /usr.sbin/snmpd
parent52d92198aae4d82d54e4b2522637655a993a8d49 (diff)
Fix copy-paste error for setting source-address in trap receiver.
OK jca@
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/parse.y7
1 files 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 <reyk@openbsd.org>
@@ -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);