svn commit: r295529 - in head/sys: net netinet netinet6

Kubilay Kocak koobs at FreeBSD.org
Fri Feb 12 02:50:21 UTC 2016


On 12/02/2016 4:07 AM, Devin Teske wrote:
> Author: dteske
> Date: Thu Feb 11 17:07:19 2016
> New Revision: 295529
> URL: https://svnweb.freebsd.org/changeset/base/295529
> 
> Log:
>   Merge SVN r295220 (bz) from projects/vnet/
>   
>   Fix a panic that occurs when a vnet interface is unavailable at the time the
>   vnet jail referencing said interface is stopped.
>   
>   Sponsored by:	FIS Global, Inc.


Was/is there a bugzilla issue for this?

Also, MFC and/or re (10.3-R) candidate?

> Modified:
>   head/sys/net/route.c
>   head/sys/netinet/in_rmx.c
>   head/sys/netinet6/in6_rmx.c
> Directory Properties:
>   head/   (props changed)
>   head/sys/   (props changed)
> 
> Modified: head/sys/net/route.c
> ==============================================================================
> --- head/sys/net/route.c	Thu Feb 11 16:54:23 2016	(r295528)
> +++ head/sys/net/route.c	Thu Feb 11 17:07:19 2016	(r295529)
> @@ -353,10 +353,24 @@ rt_table_init(int offset)
>  	return (rh);
>  }
>  
> +static int
> +rt_freeentry(struct radix_node *rn, void *arg)
> +{
> +	struct radix_head * const rnh = arg;
> +	struct radix_node *x;
> +
> +	x = (struct radix_node *)rn_delete(rn + 2, NULL, rnh);
> +	if (x != NULL)
> +		R_Free(x);
> +	return (0);
> +}
> +
>  void
>  rt_table_destroy(struct rib_head *rh)
>  {
>  
> +	rn_walktree(&rh->rmhead.head, rt_freeentry, &rh->rmhead.head);
> +
>  	/* Assume table is already empty */
>  	rw_destroy(&rh->rib_lock);
>  	free(rh, M_RTABLE);
> 
> Modified: head/sys/netinet/in_rmx.c
> ==============================================================================
> --- head/sys/netinet/in_rmx.c	Thu Feb 11 16:54:23 2016	(r295528)
> +++ head/sys/netinet/in_rmx.c	Thu Feb 11 17:07:19 2016	(r295529)
> @@ -133,7 +133,8 @@ int
>  in_detachhead(void **head, int off)
>  {
>  
> -	return (rn_detachhead(head));
> +	rt_table_destroy((struct rib_head *)(*head));
> +	return (1);
>  }
>  #endif
>  
> 
> Modified: head/sys/netinet6/in6_rmx.c
> ==============================================================================
> --- head/sys/netinet6/in6_rmx.c	Thu Feb 11 16:54:23 2016	(r295528)
> +++ head/sys/netinet6/in6_rmx.c	Thu Feb 11 17:07:19 2016	(r295529)
> @@ -237,7 +237,9 @@ in6_detachhead(void **head, int off)
>  {
>  
>  	callout_drain(&V_rtq_mtutimer);
> -	return (rn_detachhead(head));
> +	rt_table_destroy((struct rib_head *)(*head));
> +
> +	return (1);
>  }
>  #endif
>  
> _______________________________________________
> svn-src-head at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"
> 



More information about the svn-src-all mailing list