Page MenuHomeVyOS Platform

snmp: IPv6 trap-target is written to snmpd.conf without brackets and transport
In progress, LowPublicBUG

Description

With an IPv6 address as SNMP v2c trap-target, the generated trap2sink line in /etc/snmp/snmpd.conf holds the bare address followed by :port. net-snmp cannot parse that as an IPv6 destination, so traps are not sent to the target.

Steps to reproduce

set service snmp community public authorization ro
set service snmp trap-target 2001:db8::55 community public
commit

Result in /etc/snmp/snmpd.conf

trap2sink 2001:db8::55:162 public

Expected

trap2sink udp6:[2001:db8::55]:162 public

The template data/templates/snmp/etc.snmpd.conf.j2 already does this for listen-address (udp6: plus bracketize_ipv6), but not for trap-target.

I have a fix with a smoketest and will open a PR.

Details

Version
2026.11.26-0016-rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav changed the task status from Open to In progress.Mon, Nov 30, 12:06 PM
Viacheslav assigned this task to jamesperu.
Viacheslav changed the subtype of this task from "Task" to "Bug".