ip_carp.c (170373) | ip_carp.c (170613) |
---|---|
1/* $FreeBSD: head/sys/netinet/ip_carp.c 170373 2007-06-06 14:21:49Z glebius $ */ | 1/* $FreeBSD: head/sys/netinet/ip_carp.c 170613 2007-06-12 16:24:56Z bms $ */ |
2 3/* 4 * Copyright (c) 2002 Michael Shalayeff. All rights reserved. 5 * Copyright (c) 2003 Ryan McBride. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 365 unchanged lines hidden (view full) --- 375 sc->sc_init_counter = 1; 376 sc->sc_naddrs = sc->sc_naddrs6 = 0; /* M_ZERO? */ 377#ifdef INET6 378 sc->sc_im6o.im6o_multicast_hlim = CARP_DFLTTL; 379#endif 380 sc->sc_imo.imo_membership = (struct in_multi **)malloc( 381 (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP, 382 M_WAITOK); | 2 3/* 4 * Copyright (c) 2002 Michael Shalayeff. All rights reserved. 5 * Copyright (c) 2003 Ryan McBride. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 365 unchanged lines hidden (view full) --- 375 sc->sc_init_counter = 1; 376 sc->sc_naddrs = sc->sc_naddrs6 = 0; /* M_ZERO? */ 377#ifdef INET6 378 sc->sc_im6o.im6o_multicast_hlim = CARP_DFLTTL; 379#endif 380 sc->sc_imo.imo_membership = (struct in_multi **)malloc( 381 (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP, 382 M_WAITOK); |
383 sc->sc_imo.imo_mfilters = NULL; |
|
383 sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS; 384 sc->sc_imo.imo_multicast_vif = -1; 385 386 callout_init(&sc->sc_ad_tmo, NET_CALLOUT_MPSAFE); 387 callout_init(&sc->sc_md_tmo, NET_CALLOUT_MPSAFE); 388 callout_init(&sc->sc_md6_tmo, NET_CALLOUT_MPSAFE); 389 390 ifp->if_softc = sc; --- 1001 unchanged lines hidden (view full) --- 1392 1393 /* Clean up our own multicast memberships */ 1394 while (n-- > 0) { 1395 if (imo->imo_membership[n] != NULL) { 1396 in_delmulti(imo->imo_membership[n]); 1397 imo->imo_membership[n] = NULL; 1398 } 1399 } | 384 sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS; 385 sc->sc_imo.imo_multicast_vif = -1; 386 387 callout_init(&sc->sc_ad_tmo, NET_CALLOUT_MPSAFE); 388 callout_init(&sc->sc_md_tmo, NET_CALLOUT_MPSAFE); 389 callout_init(&sc->sc_md6_tmo, NET_CALLOUT_MPSAFE); 390 391 ifp->if_softc = sc; --- 1001 unchanged lines hidden (view full) --- 1393 1394 /* Clean up our own multicast memberships */ 1395 while (n-- > 0) { 1396 if (imo->imo_membership[n] != NULL) { 1397 in_delmulti(imo->imo_membership[n]); 1398 imo->imo_membership[n] = NULL; 1399 } 1400 } |
1401 KASSERT(imo->imo_mfilters == NULL, 1402 ("%s: imo_mfilters != NULL", __func__)); |
|
1400 imo->imo_num_memberships = 0; 1401 imo->imo_multicast_ifp = NULL; 1402} 1403 1404#ifdef INET6 1405static void 1406carp_multicast6_cleanup(struct carp_softc *sc) 1407{ --- 810 unchanged lines hidden --- | 1403 imo->imo_num_memberships = 0; 1404 imo->imo_multicast_ifp = NULL; 1405} 1406 1407#ifdef INET6 1408static void 1409carp_multicast6_cleanup(struct carp_softc *sc) 1410{ --- 810 unchanged lines hidden --- |