lwIP - A Lightweight TCP/IP stack - Patches: patch #9169, Allows multicast packets through...
You are not allowed to post comments on this tracker with your current authentication level.
patch #9169: Allows multicast packets through udp input layer
Submitter: | Alex Moran <alex081293> | ||
Submitted: | Mon 21 Nov 2016 07:49:51 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Invalid | Privacy: | Public |
Assigned to: | None | Open/Closed: | Closed |
Planned Release: | None |
Jump to the original submission
Wed 23 Nov 2016 02:28:35 PM UTC, comment #8: |
David van Moolenbroek <dcvmoole> |
Tue 22 Nov 2016 09:06:10 PM UTC, comment #7:
|
Alex Moran <alex081293> |
Tue 22 Nov 2016 08:03:52 PM UTC, comment #6: Ooops, haven't read comment #4 before sending #5 |
Simon Goldschmidt <goldsimon> |
Tue 22 Nov 2016 07:39:46 PM UTC, comment #5: To you both: it would have been better to keep the discussion about patch #9165 there, these long off-topic posts confuse me ;-)
|
Simon Goldschmidt <goldsimon> |
Tue 22 Nov 2016 07:37:36 PM UTC, comment #4: [...]
|
Dirk Ziegelmeier <dziegel> |
Tue 22 Nov 2016 06:03:31 PM UTC, comment #3:
Shouldn't this be possible but not care about the port? I ONLY want data from that IP address, I want to connect to that device...it's much like UDP bind (in regards to changing semantics), where port 0 is an invalid port signifies you really don't care what port you open up on. Why not have it configured to be able to handle both cases?
|
Alex Moran <alex081293> |
Tue 22 Nov 2016 01:31:27 PM UTC, comment #2: Simply don't call udp_connect() and you will receive all multicast traffic on that PCB automatically.
|
Dirk Ziegelmeier <dziegel> |
Mon 21 Nov 2016 07:56:00 PM UTC, comment #1: Of course an igmp_joingroup would also be required to the example code I added. |
Alex Moran <alex081293> |
Mon 21 Nov 2016 07:49:51 PM UTC, original submission:
If user opens a raw socket to a multicast address, the current udp layer drops the packet because it's only looking if remote ip address is any value or if the pcb remote address is equal to the packet source address. In the case of multicast traffic, the packet source is irrelevant the critical info is if the packet destination is equal to the pcb remote ip.
|
Alex Moran <alex081293> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-11-22 | dziegel | Status | None | Invalid | |
Open/Closed | Open | Closed |
Powered by Savane 3.13-02a9.
Corresponding source code
You really are confusing bind and connect. If you want to receive multicast packets sent to 239.1.80.1, you bind the socket to 239.1.80.1 (along with the destination port), in addition to joining the multicast group. If you want to receive such packets sent from 192.168.1.2 or 192.168.1.3 only, you will have to perform such source-IP checks in the application - but that does not seem to be what you want anyway. In other words, to achieve what you originally wanted, you can simply do this:
struct ip_addr multicast_addr;
IP4_ADDR(&multicast_addr, 239, 1, 80, 1);
int mPort= 12032;
udp_bind(this->pcb, &multicast_addr, mPort);