frr
frr copied to clipboard
pbrd: Fix PBR rules not installing when > 32 interfaces
Issue: PBR rules don't install to kernel when more than 32 interfaces use the same PBR policy.
Root cause: Bit shift overflow when install_bit >= 32. Basically Line 197 uses "1 << pmi->install_bit" where "1" is a 32-bit int. Shifting by >= 32 positions causes undefined behavior.
Fix: Cast to uint64_t before shifting: "(uint64_t)1 << pmi->install_bit". this extends limit from 32 to 64 interfaces per PBR policy
Ticket:#4647646