[BACK]Return to mld6.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet6

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet6/mld6.c between version 1.61.2.3 and 1.63

version 1.61.2.3, 2015/12/27 12:10:07 version 1.63, 2015/08/24 22:21:27
Line 394  mld_input(struct mbuf *m, int off)
Line 394  mld_input(struct mbuf *m, int off)
          *           *
          * In Non-Listener state, we simply don't have a membership record.           * In Non-Listener state, we simply don't have a membership record.
          * In Delaying Listener state, our timer is running (in6m->in6m_timer)           * In Delaying Listener state, our timer is running (in6m->in6m_timer)
          * In Idle Listener state, our timer is not running           * In Idle Listener state, our timer is not running
          * (in6m->in6m_timer==IN6M_TIMER_UNDEF)           * (in6m->in6m_timer==IN6M_TIMER_UNDEF)
          *           *
          * The flag is in6m->in6m_state, it is set to MLD_OTHERLISTENER if           * The flag is in6m->in6m_state, it is set to MLD_OTHERLISTENER if
Line 501  mld_input(struct mbuf *m, int off)
Line 501  mld_input(struct mbuf *m, int off)
 }  }
   
 static void  static void
 mld_sendpkt(struct in6_multi *in6m, int type,  mld_sendpkt(struct in6_multi *in6m, int type,
         const struct in6_addr *dst)          const struct in6_addr *dst)
 {  {
         struct mbuf *mh;          struct mbuf *mh;
Line 622  mld_allocbuf(struct mbuf **mh, int len, 
Line 622  mld_allocbuf(struct mbuf **mh, int len, 
  * Add an address to the list of IP6 multicast addresses for a given interface.   * Add an address to the list of IP6 multicast addresses for a given interface.
  */   */
 struct  in6_multi *  struct  in6_multi *
 in6_addmulti(struct in6_addr *maddr6, struct ifnet *ifp,  in6_addmulti(struct in6_addr *maddr6, struct ifnet *ifp,
         int *errorp, int timer)          int *errorp, int timer)
 {  {
         struct  in6_ifaddr *ia;          struct  in6_ifaddr *ia;
Line 658  in6_addmulti(struct in6_addr *maddr6, st
Line 658  in6_addmulti(struct in6_addr *maddr6, st
                 in6m->in6m_ifp = ifp;                  in6m->in6m_ifp = ifp;
                 in6m->in6m_refcount = 1;                  in6m->in6m_refcount = 1;
                 in6m->in6m_timer = IN6M_TIMER_UNDEF;                  in6m->in6m_timer = IN6M_TIMER_UNDEF;
                 callout_init(&in6m->in6m_timer_ch, CALLOUT_MPSAFE);  
                 callout_setfunc(&in6m->in6m_timer_ch, mld_timeo, in6m);  
   
                 IFP_TO_IA6(ifp, ia);                  IFP_TO_IA6(ifp, ia);
                 if (ia == NULL) {                  if (ia == NULL) {
                         callout_destroy(&in6m->in6m_timer_ch);  
                         free(in6m, M_IPMADDR);                          free(in6m, M_IPMADDR);
                         splx(s);                          splx(s);
                         *errorp = EADDRNOTAVAIL; /* appropriate? */                          *errorp = EADDRNOTAVAIL; /* appropriate? */
Line 680  in6_addmulti(struct in6_addr *maddr6, st
Line 676  in6_addmulti(struct in6_addr *maddr6, st
                 sockaddr_in6_init(&sin6, maddr6, 0, 0, 0);                  sockaddr_in6_init(&sin6, maddr6, 0, 0, 0);
                 *errorp = if_mcast_op(ifp, SIOCADDMULTI, sin6tosa(&sin6));                  *errorp = if_mcast_op(ifp, SIOCADDMULTI, sin6tosa(&sin6));
                 if (*errorp) {                  if (*errorp) {
                         callout_destroy(&in6m->in6m_timer_ch);  
                         LIST_REMOVE(in6m, in6m_entry);                          LIST_REMOVE(in6m, in6m_entry);
                         free(in6m, M_IPMADDR);                          free(in6m, M_IPMADDR);
                         ifafree(&ia->ia_ifa);                          ifafree(&ia->ia_ifa);
Line 688  in6_addmulti(struct in6_addr *maddr6, st
Line 683  in6_addmulti(struct in6_addr *maddr6, st
                         return (NULL);                          return (NULL);
                 }                  }
   
                   callout_init(&in6m->in6m_timer_ch, CALLOUT_MPSAFE);
                   callout_setfunc(&in6m->in6m_timer_ch, mld_timeo, in6m);
                 in6m->in6m_timer = timer;                  in6m->in6m_timer = timer;
                 if (in6m->in6m_timer > 0) {                  if (in6m->in6m_timer > 0) {
                         in6m->in6m_state = MLD_REPORTPENDING;                          in6m->in6m_state = MLD_REPORTPENDING;
Line 766  in6_delmulti(struct in6_multi *in6m)
Line 763  in6_delmulti(struct in6_multi *in6m)
   
   
 struct in6_multi_mship *  struct in6_multi_mship *
 in6_joingroup(struct ifnet *ifp, struct in6_addr *addr,  in6_joingroup(struct ifnet *ifp, struct in6_addr *addr,
         int *errorp, int timer)          int *errorp, int timer)
 {  {
         struct in6_multi_mship *imm;          struct in6_multi_mship *imm;

Legend:
Removed from v.1.61.2.3  
changed lines
  Added in v.1.63

CVSweb <webmaster@jp.NetBSD.org>