Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jun 2011 08:41:44 +0000 (UTC)
From:      Sergey Kandaurov <pluknet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223625 - head/sys/net
Message-ID:  <201106280841.p5S8fi00035985@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pluknet
Date: Tue Jun 28 08:41:44 2011
New Revision: 223625
URL: http://svn.freebsd.org/changeset/base/223625

Log:
  Update ifc_len field of struct ifconf passed for the ioctl SIOCGIFCONF32
  (i.e. under COMPAT_FREEBSD32) in case ifconf() returned success to match
  the native SIOCGIFCONF behavior.
  
  PR:		kern/158369
  Reported by:	Paul Procacci <pprocacci att gmail com>
  MFC after:	1 week

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Tue Jun 28 08:36:48 2011	(r223624)
+++ head/sys/net/if.c	Tue Jun 28 08:41:44 2011	(r223625)
@@ -2467,6 +2467,8 @@ ifioctl(struct socket *so, u_long cmd, c
 
 			error = ifconf(SIOCGIFCONF, (void *)&ifc);
 			CURVNET_RESTORE();
+			if (error == 0)
+				ifc32->ifc_len = ifc.ifc_len;
 			return (error);
 		}
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106280841.p5S8fi00035985>