I was also experiencing this issue and did a little digging and found the following that might be helpful.
Some background on my system, this is a long standing install from 2017 and I've only installed stable releases. I tried uninstalling and reinstalling the script as recommended but that did not change anything, the log file would keep growing with the "Connection from UDP:" messages.
I look a look at the do-inst.sh script and tried tracing its steps and during install it prompts "Editing SNMP startup options in rc.snmpd to be [-LF 0-5 /var/log/snmpd.log -A -p /var/run/snmpd -a]", but when I take a look at /etc/rc.d/rc.snmpd the variable doesn't appear to be updated and is missing the logging syntax.
#!/bin/sh
#
# rc.snmpd This shell script takes care of starting and stopping
# the net-snmp SNMP daemon
[ -r /etc/default/snmpd ] && . /etc/default/snmpd
SNMPD_OPTIONS=${SNMPD_OPTIONS:-"-A -p /var/run/snmpd -a"}
I tried updating the rc.snmpd file with the correct options but it kept insisting on using "-A -p /var/run/snmpd -a". I then found that the snmp options are also defined under "/etc/default/snmpd" and if the variable is already set, it will use that and not what is listed under rc.snmpd.
cat /etc/default/snmpd
# Options to use when running snmpd:
SNMPD_OPTIONS="-A -p /var/run/snmpd -a"
ps -ef | grep snmp
root 8961 1 0 09:57 ? 00:00:00 /usr/sbin/snmpd -A -p /var/run/snmpd -a -c /etc/snmp/snmpd.conf
root 21364 9181 0 10:13 pts/3 00:00:00 grep snmp
So, I went in and edited /etc/default/snmpd and added the missing syntax and voila, problem is fixed for me and the snmpd.log file is no longer growing.
cat /etc/default/snmpd
# Options to use when running snmpd:
SNMPD_OPTIONS="-LF 0-5 /var/log/snmpd.log -A -p /var/run/snmpd -a"
ps -ef | grep snmp
root 5131 9181 0 10:32 pts/3 00:00:00 grep snmp
root 24264 1 0 10:17 ? 00:00:00 /usr/sbin/snmpd -LF 0-5 /var/log/snmpd.log -A -p /var/run/snmpd -a -c /etc/snmp/snmpd.conf
Hope this helps