Date: Fri, 11 May 2018 21:42:27 +0000 (UTC) From: Stephen Hurd <shurd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333505 - in head/sys: netinet netinet6 Message-ID: <201805112142.w4BLgRK6088066@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: shurd Date: Fri May 11 21:42:27 2018 New Revision: 333505 URL: https://svnweb.freebsd.org/changeset/base/333505 Log: Fix LORs in in6?_leave_group() r333175 updated the join_group functions, but not the leave_group ones. Reviewed by: sbruno Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15393 Modified: head/sys/netinet/in_mcast.c head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Fri May 11 20:47:45 2018 (r333504) +++ head/sys/netinet/in_mcast.c Fri May 11 21:42:27 2018 (r333505) @@ -2501,6 +2501,8 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop /* * Begin state merge transaction at IGMP layer. */ + in_pcbref(inp); + INP_WUNLOCK(inp); IN_MULTI_LOCK(); if (is_final) { @@ -2531,6 +2533,9 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop out_in_multi_locked: IN_MULTI_UNLOCK(); + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) + return (ENXIO); if (error) imf_rollback(imf); Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Fri May 11 20:47:45 2018 (r333504) +++ head/sys/netinet6/in6_mcast.c Fri May 11 21:42:27 2018 (r333505) @@ -2381,6 +2381,8 @@ in6p_leave_group(struct inpcb *inp, struct sockopt *so /* * Begin state merge transaction at MLD layer. */ + in_pcbref(inp); + INP_WUNLOCK(inp); IN6_MULTI_LOCK(); if (is_final) { @@ -2407,6 +2409,9 @@ in6p_leave_group(struct inpcb *inp, struct sockopt *so } IN6_MULTI_UNLOCK(); + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) + return (ENXIO); if (error) im6f_rollback(imf);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805112142.w4BLgRK6088066>