]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ldpd: send correct notification code upon receipt of malformed packet
authorRenato Westphal <renato@opensourcerouting.org>
Tue, 10 Oct 2017 12:41:26 +0000 (09:41 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 10 Oct 2017 12:43:54 +0000 (09:43 -0300)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ldpd/packet.c

index be7f2ba649c6c013863693aae509b38eaf18775b..4a4b258b91b1c416399838d9c6bcf7732c1cb683 100644 (file)
@@ -494,7 +494,7 @@ session_read(struct thread *thread)
                        msg_len = ntohs(msg->length);
                        if (msg_len < LDP_MSG_LEN ||
                            (msg_len + LDP_MSG_DEAD_LEN) > pdu_len) {
-                               session_shutdown(nbr, S_BAD_TLV_LEN, msg->id,
+                               session_shutdown(nbr, S_BAD_MSG_LEN, msg->id,
                                    msg->type);
                                free(buf);
                                return (0);