From 8fada27075f654a9f0ae1d54fb045ac5034f91ec Mon Sep 17 00:00:00 2001 From: claudio Date: Wed, 17 Apr 2024 06:18:18 +0000 Subject: [PATCH] Only use the first egress interface in $IFIDX and $IFLLADDR. Systems can have more then one interface. This only works if ther first egress interface is a ethernet interface (P2P interfaces have no LLADDR) but that was already buggy before this. OK bluhm@ martijn@ --- regress/usr.bin/snmp/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regress/usr.bin/snmp/Makefile b/regress/usr.bin/snmp/Makefile index 983efc2ddf5..d398d3f9dbb 100644 --- a/regress/usr.bin/snmp/Makefile +++ b/regress/usr.bin/snmp/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2024/02/08 17:09:51 martijn Exp $ +# $OpenBSD: Makefile,v 1.8 2024/04/17 06:18:18 claudio Exp $ SNMP?= /usr/bin/snmp SNMPD?= /usr/sbin/snmpd -f ${.OBJDIR}/snmpd.conf @@ -18,8 +18,8 @@ REGRESS_CLEANUP= stop REGRESS_SKIP_TARGETS= CLEANFILES= -IFIDX!= ifconfig egress | awk '/index/{print $$2}' -IFLLADDR!= ifconfig egress | awk '/lladdr/{gsub(":", " ", $$2); print toupper($$2)}' +IFIDX!= ifconfig egress | awk '/index/{print $$2; exit}' +IFLLADDR!= ifconfig egress | awk '/lladdr/{gsub(":", " ", $$2); print toupper($$2); exit}' CLEANFILES+= snmpd.conf snmpd.conf: Makefile -- 2.20.1