Re: ims_merge in in_mcast.c

2020-10-21 Thread Dheeraj Kandula
The ims_merge function is invoked only when the imsl_st[0] and imsl_st[1] are different i.e. a filter mode change. The new filter mode is updated in ims_st[1]. Thanks for the clarification. Thanks Dheeraj On Tue, Oct 13, 2020 at 9:58 AM Dheeraj Kandula wrote: > Thanks, HPS for the response. I t

Re: ims_merge in in_mcast.c

2020-10-13 Thread Dheeraj Kandula
Thanks, HPS for the response. I think the index 0 is for a state (previous to current) and 1 indicates the current state. I am still trying to figure out what they really mean. Maybe reading the RFC will shed some light on the intention. My understanding is that the state transition is from index

Re: ims_merge in in_mcast.c

2020-10-13 Thread Hans Petter Selasky
On 2020-10-12 19:11, Dheeraj Kandula wrote: On line 987 and 991 shouldn't the index be 0 instead of 1. i.e. ims->ims_st[0].ex -= n; and ims->ims_st[0].in -= n; On a rollback, the entry at index 0 is incremented and the entry at index 1 is decremented. On a non-rollback merge, the entry at inde

ims_merge in in_mcast.c

2020-10-12 Thread Dheeraj Kandula
974 /* 975 * Merge socket-layer source into IGMP-layer source. 976 * If rollback is non-zero, perform the inverse of the merge. 977 */ 978 static void 979 ims_merge(struct ip_msource *ims, const struct in_msource *lims, 980 const int rollback) 981 { 982 int n = rollback ? -1 : 1; 983 984 if (lims->

ims_merge in in_mcast.c and in6_mcast.c

2020-10-12 Thread Dheeraj Kandula
974 /* 975 * Merge socket-layer source into IGMP-layer source. 976