02ff676c4d
.ifra_name is assumed to be NUL terminated; using strlcpy(3) ensures that it's indeed NUL terminated whereas strncpy does not. Tested and verified as follows with a combination of ifconfig, snmpget, and snmpset: % ifconfig create lo1 127.0.0.2/8 % SNMPARGS="-v 3 -n '' -u bsnmp -A bsnmptest -l authPriv -a sha -x des -X bsnmptest localhost" % snmpget $SNMPARGS IF-MIB::ifAdminStatus.4 IF-MIB::ifAdminStatus.4 = INTEGER: up(1) % snmpset $SNMPARGS IF-MIB::ifAdminStatus.4 i 2 IF-MIB::ifAdminStatus.4 = INTEGER: down(2) % snmpget $SNMPARGS IF-MIB::ifAdminStatus.4 IF-MIB::ifAdminStatus.4 = INTEGER: down(2) % snmpset $SNMPARGS IF-MIB::ifAdminStatus.4 i 1 IF-MIB::ifAdminStatus.4 = INTEGER: up(1) % snmpget $SNMPARGS IF-MIB::ifAdminStatus.4 IF-MIB::ifAdminStatus.4 = INTEGER: up(1) MFC after: 2 weeks Reported by: Coverity CID: 1009652-1009656, 1349850 |
||
---|---|---|
.. | ||
BEGEMOT-IP-MIB.txt | ||
BEGEMOT-MIB2-MIB.txt | ||
mibII_begemot.c | ||
mibII_ifmib.c | ||
mibII_ifstack.c | ||
mibII_interfaces.c | ||
mibII_ip.c | ||
mibII_ipaddr.c | ||
mibII_nettomedia.c | ||
mibII_rcvaddr.c | ||
mibII_route.c | ||
mibII_tcp.c | ||
mibII_tree.def | ||
mibII_udp.c | ||
mibII.c | ||
mibII.h | ||
snmp_mibII.3 | ||
snmp_mibII.h |