mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-06 00:39:59 +00:00
Tried to fix bug #47270 by accepting all ipv4 multicast packets (at IP level) when LWIP_IGMP is disabled
This commit is contained in:
parent
15326cdbad
commit
6b405eccd0
@ -450,8 +450,8 @@ ip4_input(struct pbuf *p, struct netif *inp)
|
||||
ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
|
||||
|
||||
/* match packet against an interface, i.e. is this packet for us? */
|
||||
#if LWIP_IGMP
|
||||
if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
|
||||
#if LWIP_IGMP
|
||||
if ((inp->flags & NETIF_FLAG_IGMP) && (igmp_lookfor_group(inp, ip4_current_dest_addr()))) {
|
||||
/* IGMP snooping switches need 0.0.0.0 to be allowed as source address (RFC 4541) */
|
||||
ip4_addr_t allsystems;
|
||||
@ -464,9 +464,14 @@ ip4_input(struct pbuf *p, struct netif *inp)
|
||||
} else {
|
||||
netif = NULL;
|
||||
}
|
||||
} else
|
||||
#else /* LWIP_IGMP */
|
||||
if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) {
|
||||
netif = inp;
|
||||
} else {
|
||||
netif = NULL;
|
||||
}
|
||||
#endif /* LWIP_IGMP */
|
||||
{
|
||||
} else {
|
||||
/* start trying with inp. if that's not acceptable, start walking the
|
||||
list of configured netifs.
|
||||
'first' is used as a boolean to mark whether we started walking the list */
|
||||
|
Loading…
x
Reference in New Issue
Block a user