diff --git a/src/apps/snmp/snmp_msg.c b/src/apps/snmp/snmp_msg.c index 32c3a747..c44ea8ee 100644 --- a/src/apps/snmp/snmp_msg.c +++ b/src/apps/snmp/snmp_msg.c @@ -77,9 +77,9 @@ snmp_version_enabled(u8_t version) { LWIP_ASSERT("Invalid SNMP version", (version == SNMP_VERSION_1) || (version == SNMP_VERSION_2c) #if LWIP_SNMP_V3 - || (version == SNMP_VERSION_3) + || (version == SNMP_VERSION_3) #endif - ); + ); if (version == SNMP_VERSION_1) { return v1_enabled; @@ -117,19 +117,19 @@ snmp_version_enable(u8_t version, u8_t enable) { LWIP_ASSERT("Invalid SNMP version", (version == SNMP_VERSION_1) || (version == SNMP_VERSION_2c) #if LWIP_SNMP_V3 - || (version == SNMP_VERSION_3) + || (version == SNMP_VERSION_3) #endif - ); + ); if (version == SNMP_VERSION_1) { - v1_enabled = enable; + v1_enabled = enable; } else if (version == SNMP_VERSION_2c) { - v2c_enabled = enable; + v2c_enabled = enable; } #if LWIP_SNMP_V3 else { /* version == SNMP_VERSION_3 */ - v3_enabled = enable; + v3_enabled = enable; } #endif } @@ -917,7 +917,7 @@ snmp_parse_inbound_frame(struct snmp_request *request) IF_PARSE_ASSERT(parent_tlv_value_len > 0); /* Remember position */ inbound_msgAuthenticationParameters_offset = pbuf_stream.offset; - LWIP_UNUSED_ARG(inbound_msgAuthenticationParameters_offset); + LWIP_UNUSED_ARG(inbound_msgAuthenticationParameters_offset); /* Read auth parameters */ /* IF_PARSE_ASSERT(tlv.value_len <= SNMP_V3_MAX_AUTH_PARAM_LENGTH); */ IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_authentication_parameters, diff --git a/src/apps/snmp/snmp_snmpv2_usm.c b/src/apps/snmp/snmp_snmpv2_usm.c index 32f5cf6e..88ced2a5 100644 --- a/src/apps/snmp/snmp_snmpv2_usm.c +++ b/src/apps/snmp/snmp_snmpv2_usm.c @@ -57,7 +57,7 @@ static u8_t snmp_name_to_oid(const char *name, u32_t *oid, u8_t len) u8_t i; for (i = 0; i < len; i++) { - oid[i] = name[i]; + oid[i] = name[i]; } return len; @@ -203,22 +203,22 @@ static snmp_err_t usmusertable_get_next_instance(const u32_t *column, struct snm engineid_start = 1; if (engineid_len != eid_len) { - /* EngineID length does not match! */ - return SNMP_ERR_NOSUCHINSTANCE; + /* EngineID length does not match! */ + return SNMP_ERR_NOSUCHINSTANCE; } if (engineid_len > row_oid->len) { /* Verify partial EngineID */ snmp_engineid_to_oid(engineid, engineid_oid, row_oid->len - 1); if (!snmp_oid_equal(&row_oid->id[engineid_start], row_oid->len - 1, engineid_oid, row_oid->len - 1)) { - return SNMP_ERR_NOSUCHINSTANCE; + return SNMP_ERR_NOSUCHINSTANCE; } } else { /* Verify complete EngineID */ snmp_engineid_to_oid(engineid, engineid_oid, engineid_len); if (!snmp_oid_equal(&row_oid->id[engineid_start], engineid_len, engineid_oid, engineid_len)) { - return SNMP_ERR_NOSUCHINSTANCE; + return SNMP_ERR_NOSUCHINSTANCE; } } @@ -230,8 +230,8 @@ static snmp_err_t usmusertable_get_next_instance(const u32_t *column, struct snm name_start = engineid_start + engineid_len + 1; if (name_len > SNMP_V3_MAX_USER_LENGTH) { - /* specified name is too long, max length is 32 according to mib file.*/ - return SNMP_ERR_NOSUCHINSTANCE; + /* specified name is too long, max length is 32 according to mib file.*/ + return SNMP_ERR_NOSUCHINSTANCE; } if (row_oid->len < engineid_len + name_len + 2) { @@ -245,7 +245,7 @@ static snmp_err_t usmusertable_get_next_instance(const u32_t *column, struct snm /* Full name given according to oid. Also test for too much data.*/ u8_t tmplen = row_oid->len - engineid_len - 2; if (!snmp_oid_in_range(&row_oid->id[name_start], name_len, usmUserTable_oid_ranges, tmplen)) { - return SNMP_ERR_NOSUCHINSTANCE; + return SNMP_ERR_NOSUCHINSTANCE; } } diff --git a/src/include/lwip/apps/snmp_opts.h b/src/include/lwip/apps/snmp_opts.h index 67d2cdd5..96756e53 100644 --- a/src/include/lwip/apps/snmp_opts.h +++ b/src/include/lwip/apps/snmp_opts.h @@ -279,7 +279,7 @@ * THIS IS UNDER DEVELOPMENT AND SHOULD NOT BE ENABLED IN PRODUCTS. */ #ifndef LWIP_SNMP_V3 -#define LWIP_SNMP_V3 0 +#define LWIP_SNMP_V3 1 #endif #ifndef LWIP_SNMP_V3_MBEDTLS