stoffi92 / rfc5575bis

0 stars 0 forks source link

IESG Benjamin Kaduk: Comparison Operator #196

Closed stoffi92 closed 4 years ago

stoffi92 commented 4 years ago

For all other component types, unless otherwise specified, the comparison is performed by comparing the component data as a binary string using the memcmp() function as defined by [ISO_IEC_9899]. For strings with equal lengths the lowest string (memcmp) has higher precedence. For strings of different lengths, the common prefix is compared. If the common prefix is not equal the string with the lowest prefix has higher precedence. If the common prefix is equal, the longest string is considered to have higher precedence than the shorter one.

It is surprising to me that the comparison operator can return "not-equal" for different encodings of a quantity that have the same semantic value (viz my previous note about encoding flexibility). That said, this procedure is well-defined and BGP speakers are not going to be re-encoding the NRLI values as they propagate, so I don't see an interop problem.

suehares commented 4 years ago

While Ben is surprised, this is common in BGP. Christoph - you can close this one if Robert has the same opinion.

stoffi92 commented 4 years ago

@raszuk same opinion? -> then please close.

stoffi92 commented 4 years ago

//doc The comparison does not return not-equal:

If the common prefix is not equal the string with the lowest prefix has higher precedence.

The result is higher precedence to the lowest prefix in case the common prefix is not equal.