buglwIP - A Lightweight TCP/IP stack - Bugs: bug #20595, LWIP IGMP ignores IGMP v3 packets

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #20595: LWIP IGMP ignores IGMP v3 packets

Submitted by:  thedoctor
Submitted on:  Thu 26 Jul 2007 02:57:26 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Frédéric Bernon <fbernon>
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Thu 26 Jul 2007 05:11:31 PM UTC, comment #4:

Ok, it's check in. Thank you for report that...

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.
Thu 26 Jul 2007 05:05:58 PM UTC, comment #3:

OK

thedoctor
Thu 26 Jul 2007 04:32:31 PM UTC, comment #2:

This test ...

if (pbuf_header(p, -hlen) || (p->tot_len < sizeof(u16_t)*2)) {

should be ...

if (pbuf_header(p, -hlen)) {

since there is after...

if (p->len < IGMP_MINLEN)

which is more "sure" since even if p->tot_len==5, the frame which be dropped. Last, I think it miss a "pbuf_free(p);" in this first part.

I propose you the patch I join. Can you tell me if it's good for you?

(file #13482)

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.
Thu 26 Jul 2007 03:28:44 PM UTC, comment #1:

I will test that, since it's seems good.

But don't forget that the implementation stay a IGMPv2: you can include/exclude any multicast source like with a full IGMPv3. Last, the IGMPv3 "report" code (0x22) is not the same that IGMPv2 one (0x16). But your patch should be enought...

Type Number (hex) Message Name
----------------- ------------

0x11 Membership Query
0x22 Version 3 Membership Report

An implementation of IGMPv3 MUST also support the following three message types, for interoperation with previous versions of IGMP (see section 7):

0x12 Version 1 Membership Report [RFC-1112]
0x16 Version 2 Membership Report [RFC-2236]
0x17 Version 2 Leave Group [RFC-2236]

Just for information: do you need a IGMPv3 full implementation, or is it just to be compatible with any Querier ?

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.
Thu 26 Jul 2007 02:57:26 PM UTC, original submission:

LWIP IGMP discards IGMP v3 query messages because it does not check the checksum over the entire PDU as required by RFC2236 clause 2.3. Instead it assumes the PDU is only 8 bytes long.

Note that an IGMP v3 query message is the same as an IGMP v2 query but has additional fields after the Group Address (See RFC3376 clause 4.1). These additional fields are included in the checksum.

My suggested fix is attached. I've tested it and it works.

thedoctor

 

Attached Files
file #13482:  igmp_input.patch added by fbernon (1KiB - text/x-patch)
file #13478:  igmp.c.patch added by thedoctor (1KiB - application/octet-stream - Correct IGMP sumcheck validation)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by fbernon (Posted a comment)
  • -unavailable- added by thedoctor (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 26 Jul 2007 05:11:31 PM UTCfbernonStatusNone=>Fixed
      Assigned toNone=>fbernon
      Open/ClosedOpen=>Closed
      Planned Release=>1.3.0
    Thu 26 Jul 2007 04:32:31 PM UTCfbernonAttached File-=>Added igmp_input.patch, #13482
    Thu 26 Jul 2007 02:57:26 PM UTCthedoctorAttached File-=>Added igmp.c.patch, #13478

    Back to the top


    Powered by Savane 3.1-cleanup1