Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Sep 2014 06:44:34 +0000
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Hiroki Sato <hrs@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r271916 - head/sys/net
Message-ID:  <40476321-398C-4971-91AD-B835CF15581A@lists.zabbadoz.net>
In-Reply-To: <201409210348.s8L3mKfS012477@svn.freebsd.org>
References:  <201409210348.s8L3mKfS012477@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 21 Sep 2014, at 03:48 , Hiroki Sato <hrs@FreeBSD.org> wrote:

> Author: hrs
> Date: Sun Sep 21 03:48:20 2014
> New Revision: 271916
> URL: http://svnweb.freebsd.org/changeset/base/271916
>=20
> Log:
>  Make net.add_addr_allfibs vnet-local.

I guess it was this one:

In file included from =
/scratch/tmp/bz/head.svn/lib/libc/net/getifaddrs.c:42:
=
/storage/head/obj//i386.i386/scratch/tmp/bz/head.svn/tmp/usr/include/net/r=
oute.h:89:21: error: type specifier missing, defaults to 'int' =
[-Werror,-Wimplicit-int]
VNET_DECLARE(u_int, rt_add_addr_allfibs); /* Announce interfaces to all =
fibs */
                    ^~~~~~~~~~~~~~~~~~~
=
/storage/head/obj//i386.i386/scratch/tmp/bz/head.svn/tmp/usr/include/net/r=
oute.h:89:1: error: type specifier missing, defaults to 'int' =
[-Werror,-Wimplicit-int]
VNET_DECLARE(u_int, rt_add_addr_allfibs); /* Announce interfaces to all =
fibs */
^~~~~~~~~~~~
2 errors generated.
--- getifaddrs.So ---
*** [getifaddrs.So] Error code 1

bmake: stopped in /scratch/tmp/bz/head.svn/lib/libc
In file included from =
/scratch/tmp/bz/head.svn/lib/libc/net/getifmaddrs.c:37:
=
/storage/head/obj//i386.i386/scratch/tmp/bz/head.svn/tmp/usr/include/net/r=
oute.h:89:21: error: type specifier missing, defaults to 'int' =
[-Werror,-Wimplicit-int]
VNET_DECLARE(u_int, rt_add_addr_allfibs); /* Announce interfaces to all =
fibs */
                    ^~~~~~~~~~~~~~~~~~~
=
/storage/head/obj//i386.i386/scratch/tmp/bz/head.svn/tmp/usr/include/net/r=
oute.h:89:1: error: type specifier missing, defaults to 'int' =
[-Werror,-Wimplicit-int]
VNET_DECLARE(u_int, rt_add_addr_allfibs); /* Announce interfaces to all =
fibs */
^~~~~~~~~~~~




>=20
> Modified:
>  head/sys/net/route.c
>  head/sys/net/route.h
>=20
> Modified: head/sys/net/route.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/sys/net/route.c	Sun Sep 21 03:00:30 2014	=
(r271915)
> +++ head/sys/net/route.c	Sun Sep 21 03:48:20 2014	=
(r271916)
> @@ -108,9 +108,9 @@ SYSCTL_UINT(_net, OID_AUTO, fibs, CTLFLA
>  * always work given the fib can be overridden and prefixes can be =
added
>  * from the network stack context.
>  */
> -u_int rt_add_addr_allfibs =3D 1;
> -SYSCTL_UINT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RWTUN,
> -    &rt_add_addr_allfibs, 0, "");
> +VNET_DEFINE(u_int, rt_add_addr_allfibs) =3D 1;
> +SYSCTL_UINT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RWTUN | =
CTLFLAG_VNET,
> +    &VNET_NAME(rt_add_addr_allfibs), 0, "");
>=20
> VNET_DEFINE(struct rtstat, rtstat);
> #define	V_rtstat	VNET(rtstat)
> @@ -1613,9 +1613,9 @@ rtinit1(struct ifaddr *ifa, int cmd, int
> 		break;
> 	}
> 	if (fibnum =3D=3D RT_ALL_FIBS) {
> -		if (rt_add_addr_allfibs =3D=3D 0 && cmd =3D=3D =
(int)RTM_ADD) {
> +		if (V_rt_add_addr_allfibs =3D=3D 0 && cmd =3D=3D =
(int)RTM_ADD)
> 			startfib =3D endfib =3D ifa->ifa_ifp->if_fib;
> -		} else {
> +		else {
> 			startfib =3D 0;
> 			endfib =3D rt_numfibs - 1;
> 		}
>=20
> Modified: head/sys/net/route.h
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/sys/net/route.h	Sun Sep 21 03:00:30 2014	=
(r271915)
> +++ head/sys/net/route.h	Sun Sep 21 03:48:20 2014	=
(r271916)
> @@ -34,6 +34,7 @@
> #define _NET_ROUTE_H_
>=20
> #include <sys/counter.h>
> +#include <net/vnet.h>
>=20
> /*
>  * Kernel resident routing tables.
> @@ -85,7 +86,8 @@ struct rt_metrics {
> #define	RT_DEFAULT_FIB	0	/* Explicitly mark fib=3D0 =
restricted cases */
> #define	RT_ALL_FIBS	-1	/* Announce event for every fib =
*/
> extern u_int rt_numfibs;	/* number of usable routing tables */
> -extern u_int rt_add_addr_allfibs;	/* Announce interfaces to all =
fibs */
> +VNET_DECLARE(u_int, rt_add_addr_allfibs); /* Announce interfaces to =
all fibs */
> +#define	V_rt_add_addr_allfibs	VNET(rt_add_addr_allfibs)
>=20
> /*
>  * We distinguish between routes to hosts and routes to networks,
>=20

=97=20
Bjoern A. Zeeb             "Come on. Learn, goddamn it.", WarGames, 1983




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40476321-398C-4971-91AD-B835CF15581A>