Commit 31552ac8 authored by Adam Wujek's avatar Adam Wujek 💬 Committed by Grzegorz Daniluk

lib/snmp: ignore packets with the wrong destination IP

Signed-off-by: Adam Wujek's avatarAdam Wujek <>
parent 3187c81e
......@@ -1403,6 +1403,14 @@ static int snmp_poll(void)
if (len <= UDP_END + sizeof(match_array))
return 0;
/* Check the destination IP of SNMP packets. IP version, protocol and
* port are checked in the function update_rx_queues, so no need to
* check it again */
if (check_dest_ip(buf)) {
snmp_verbose("wrong destination IP\n");
return 0;
len = snmp_respond(buf + UDP_END);
if (len < 0)
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment