From aecbefc7284e5db24ba3f4bf90933821a73ca5dd Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 29 Jun 2016 22:14:37 +0200 Subject: [PATCH] Patch by Marco Veeneman: Tthe variable bindings field is missing in the trap message. Even if there are no varbinds attached to the trap, this field should still be present. --- src/apps/snmp/snmp_traps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/apps/snmp/snmp_traps.c b/src/apps/snmp/snmp_traps.c index 1ca7d281..fb0424b1 100644 --- a/src/apps/snmp/snmp_traps.c +++ b/src/apps/snmp/snmp_traps.c @@ -360,6 +360,9 @@ snmp_trap_header_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_s snmp_asn1_enc_s32t_cnt(trap->ts, &tlv.value_len); snmp_ans1_enc_tlv(pbuf_stream, &tlv); snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, trap->ts); + + SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 0, 0); + snmp_ans1_enc_tlv(pbuf_stream, &tlv); } #endif /* LWIP_SNMP */