/*
- * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2009 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#endif
}
-static struct route igmprt;
-
static void
igmp_sendpkt(struct in_multi *inm, int type, uint32_t addr)
{
struct igmp *igmp;
struct ip *ip;
struct ip_moptions imo;
+ struct route ro;
MGETHDR(m, M_DONTWAIT, MT_HEADER); /* MAC-OK */
if (m == NULL)
* XXX
* Do we have to worry about reentrancy here? Don't think so.
*/
- ip_output(m, router_alert, &igmprt, 0, &imo, NULL);
+ bzero(&ro, sizeof (ro));
+ (void) ip_output(m, router_alert, &ro, 0, &imo, NULL);
+ if (ro.ro_rt != NULL) {
+ rtfree(ro.ro_rt);
+ ro.ro_rt = NULL;
+ }
++igmpstat.igps_snd_reports;
}