mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-04 02:39:15 +00:00
Add in igmp_joingroup & igmp_leavegroup a LWIP_ERROR checking on netif value.
This commit is contained in:
parent
85fef90c94
commit
d7cd90b5b8
@ -339,6 +339,9 @@ igmp_joingroup(struct netif *ifp, struct ip_addr *groupaddr)
|
||||
{
|
||||
struct igmp_group *group;
|
||||
|
||||
/* make sure netif is valid */
|
||||
LWIP_ERROR("igmp_joingroup: attempt to join on NULL netif", (ifp!=NULL), return ERR_VAL;);
|
||||
|
||||
/* make sure it is multicast address */
|
||||
LWIP_ERROR("igmp_joingroup: attempt to join non-multicast address", ip_addr_ismulticast(groupaddr), return ERR_VAL;);
|
||||
|
||||
@ -387,6 +390,9 @@ igmp_leavegroup(struct netif *ifp, struct ip_addr *groupaddr)
|
||||
{
|
||||
struct igmp_group *group;
|
||||
|
||||
/* make sure netif is valid */
|
||||
LWIP_ERROR("igmp_leavegroup: attempt to leave on NULL netif", (ifp!=NULL), return ERR_VAL;);
|
||||
|
||||
/* make sure it is multicast address */
|
||||
LWIP_ERROR("igmp_leavegroup: attempt to leave non-multicast address", ip_addr_ismulticast(groupaddr), return ERR_VAL;);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user