On Sun, Apr 12, 2026 at 11:10:45AM +0000, Ujjal Roy wrote: > In IGMP, MRC and QQIC fields are not correctly encoded > when generating query packets. Since the receiver of the > query interprets these fields using the IGMPv3 floating- > point decoding logic, any value that exceeds the linear > threshold is incorrectly parsed as an exponential value, > leading to an incorrect interval calculation. > > Encode and assign the corresponding protocol fields during > query generation. Introduce the logic to dynamically > calculate the exponent and mantissa using bit-scan (fls). > This ensures MRC and QQIC fields (8-bit) are properly > encoded when transmitting query packets with intervals > that exceed their respective linear threshold value of > 128 (for MRT/QQI). > > RFC3376: for both MRC and QQIC, values >= 128 represent > the same floating-point encoding as follows: > 0 1 2 3 4 5 6 7 > +-+-+-+-+-+-+-+-+ > |1| exp | mant | > +-+-+-+-+-+-+-+-+ > > Signed-off-by: Ujjal Roy <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>

