Add in igmp_joingroup & igmp_leavegroup a LWIP_ERROR checking on netif value.

This commit is contained in:
fbernon 2007-09-03 09:56:38 +00:00
parent 85fef90c94
commit d7cd90b5b8

View File

@ -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;);