Simplify the handling of optparamlen and RFC9072 support.
authorclaudio <claudio@openbsd.org>
Fri, 27 Oct 2023 14:22:43 +0000 (14:22 +0000)
committerclaudio <claudio@openbsd.org>
Fri, 27 Oct 2023 14:22:43 +0000 (14:22 +0000)
commit1346c272bea6b7378ecd97133f5d5f16a55e570e
tree8d94a3159e5470c54e0fa9c96822c3219a910929
parent06c02db800a6ceda0fa52ae1e0fce2929a7eca74
Simplify the handling of optparamlen and RFC9072 support.

Use the ibuf_size() of the optional params (opb) when writing the various
headers. Only use optparamlen to write the Opt Parm Len field of the OPEN
message. Since there the size could be forced to 255 in case of a RFC9072
exended header. Also use size_t for optparamlen since the new ibuf API
no longer depends on using the right sized type.
OK tb@
usr.sbin/bgpd/session.c