snmp: fix session representation

And also add a test for this bit.