Upstream introduced bug, inverting the result of testing the "-n" switch in commit 99fedfe1238a7cc1bae4d44f49314a58a3649f73
In 5.7.* (rhel8) or earlier, in apps/snmptrapd_log.c it would perform,
if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
NETSNMP_DS_APP_NUMERIC_IP))
{ host = netsnmp_gethostbyaddr((char *) pdu->agent_addr, 4, AF_INET); }
but following the commit it calls a new routine convert_agent_addr() which does
const int numeric = !netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
NETSNMP_DS_APP_NUMERIC_IP);
[...]
if (getnameinfo((struct sockaddr *)&sin, sizeof(sin), name, size, NULL, 0,
numeric ? NI_NUMERICHOST : 0) < 0)
strlcpy(name, "?", sizeof(size));
The fix is simply the removal of the inversion on the assignment.