From 1066729b4f27ed979d871770a3f3a41c61a5ee2b Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 17 Oct 2011 07:48:17 +0200 Subject: [PATCH] snmp: use a 16-bit checksum, not a 15-bit one. We could use a 31-bit checksum but we would have to write it. We prefer to minimize the code. --- src/agent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent.c b/src/agent.c index f182a92f..66c17742 100644 --- a/src/agent.c +++ b/src/agent.c @@ -492,7 +492,7 @@ header_ppiindexed_table(struct variable *vp, oid *name, size_t *length, TAILQ_FOREACH(pi, &hardware->h_lport.p_pids, p_entries) { current[0] = hardware->h_ifindex; current[1] = frame_checksum((const u_char*)pi->p_pi, - pi->p_pi_len, 0) & 0x8fff; + pi->p_pi_len, 0); if ((result = snmp_oid_compare(current, 2, target, target_len)) < 0) continue; @@ -551,7 +551,7 @@ header_tprpiindexed_table(struct variable *vp, oid *name, size_t *length, current[1] = hardware->h_ifindex; current[2] = port->p_chassis->c_index; current[1] = frame_checksum((const u_char *)pi->p_pi, - pi->p_pi_len, 0) & 0x8fff; + pi->p_pi_len, 0); if ((result = snmp_oid_compare(current, 4, target, target_len)) < 0) continue; -- 2.47.2