]> git.proxmox.com Git - mirror_frr.git/commit - ldpd/address.c
ldpd: send correct status code on error condition
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)
commita33df200732c7d7470fa9060a70ab59e2076932e
tree93bbf6e8f14f2b3e8360331b8931451f7233da00
parentfaf757937f8a38f96cfd732068588830e0a998b5
ldpd: send correct status code on error condition

The Unknown TLV status code is reserved for cases where we don't know
how to process a given TLV and its Unknown TLV bit is not set.

In the case of Address Messages, the Address List TLV is mandatory and
should appear before any optional TLV in the message. If that doesn't
happen the correct status notification to send is "Missing Message
Parameters" (non-fatal error).

Also, add a missing htons when creating an Address List TLV. Since the
value of TLV_TYPE_ADDRLIST is 0x0101 this missing htons wasn't noticed
earlier.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ldpd/address.c