sonic-net / sonic-sairedis

SAI object interface to Redis database, as used in the SONiC project
Other
56 stars 259 forks source link

Fix SSCI parameter when creating MACsec tunnels on Bookworm #1372

Closed saiarcot895 closed 4 months ago

saiarcot895 commented 4 months ago

While Bookworm's iproute2 has built-in support for the MACsec XPN protocols, the SSCI argument is passed in in a different way compared to the patch that we had. Instead of taking in a number, a hex string is taken in instead.

Update the code in sairedis to pass in a hex string for SSCI instead of a number.

Also simplify the endian conversion for the SCI by using htobe64, so that we don't need #ifdef's checking for endianness. It's technically non-standard, but since this will be compiled for Linux, that should be fine.