summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldpd/labelmapping.c
diff options
context:
space:
mode:
authorrenato <renato@openbsd.org>2017-03-03 23:53:50 +0000
committerrenato <renato@openbsd.org>2017-03-03 23:53:50 +0000
commite95c1c119241af93e09f231dea73da059e8ab4bc (patch)
tree300027801a288bec252bcb8480449d42a8fb087e /usr.sbin/ldpd/labelmapping.c
parentCreate helper functions to log sent/received messages. (diff)
downloadwireguard-openbsd-e95c1c119241af93e09f231dea73da059e8ab4bc.tar.xz
wireguard-openbsd-e95c1c119241af93e09f231dea73da059e8ab4bc.zip
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.
Diffstat (limited to 'usr.sbin/ldpd/labelmapping.c')
0 files changed, 0 insertions, 0 deletions