mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08: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);
|
ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
|
||||||
|
|
||||||
/* match packet against an interface, i.e. is this packet for us? */
|
/* match packet against an interface, i.e. is this packet for us? */
|
||||||
#if LWIP_IGMP
|
|
||||||
if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
|
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()))) {
|
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) */
|
/* IGMP snooping switches need 0.0.0.0 to be allowed as source address (RFC 4541) */
|
||||||
ip4_addr_t allsystems;
|
ip4_addr_t allsystems;
|
||||||
@ -464,9 +464,14 @@ ip4_input(struct pbuf *p, struct netif *inp)
|
|||||||
} else {
|
} else {
|
||||||
netif = NULL;
|
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 */
|
#endif /* LWIP_IGMP */
|
||||||
{
|
} else {
|
||||||
/* start trying with inp. if that's not acceptable, start walking the
|
/* start trying with inp. if that's not acceptable, start walking the
|
||||||
list of configured netifs.
|
list of configured netifs.
|
||||||
'first' is used as a boolean to mark whether we started walking the list */
|
'first' is used as a boolean to mark whether we started walking the list */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user