frr icon indicating copy to clipboard operation
frr copied to clipboard

pbrd: Fix PBR rules not installing when > 32 interfaces

Open soumyar-roy opened this issue 1 month ago • 0 comments

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

soumyar-roy avatar Dec 09 '25 23:12 soumyar-roy