From owner-freebsd-net@FreeBSD.ORG Thu Oct 31 19:03:14 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 36A42C87 for ; Thu, 31 Oct 2013 19:03:14 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F22F28F2 for ; Thu, 31 Oct 2013 19:03:13 +0000 (UTC) X-Envelope-From: egrosbein@rdtc.ru X-Envelope-To: freebsd-net@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.7/8.14.7) with ESMTP id r9VJ347D046501; Fri, 1 Nov 2013 02:03:04 +0700 (NOVT) (envelope-from egrosbein@rdtc.ru) Message-ID: <5272A968.2050205@rdtc.ru> Date: Fri, 01 Nov 2013 02:03:04 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130415 Thunderbird/17.0.5 MIME-Version: 1.0 To: Raimundo Santos Subject: Re: MPD PPTP seting 0 on net.inet.ip.forwarding References: In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eg.sd.rdtc.ru Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 19:03:14 -0000 On 01.11.2013 01:39, Raimundo Santos wrote: > Ok, I have found some weird thing: > > > On 31 October 2013 16:08, Raimundo Santos wrote: > >> >> >> As you can see, there is no gateway_enable="YES", but there is >> net.inet.ip.forwarding=1 in /etc/sysctl.conf >> >> > MPD do not respect my configuration in sysctl.conf, only the one in > rc.conf. To test: > > * put net.inet.ip.forwarding and net.inet6.ip6.forwarding = 1 in sysctl.conf > * put gateway_enable="YES" in rc.conf > * connect to PPTP server > > You will see that net.inet.ip.forwarding, after PPTP connection are > stablished, remains 1, but net.inet6.ip6.forwarding goes to 0! > > Is that behaviour expected? > > Am I worng when setting a router without gateway_enable="YES" in rc.conf > but with net.inet.ip.forwarding=1 in sysctl.conf? That's not MPD's fault. That's FreeBSD 9.2's devd starting /etc/pccard_ether $subsystem start every time an interface is created. This leads to start of /etc/rc.d/netif quietstart $ifn netif does LOTS of things making severe (and unneeded for mpd) load on the system and resetting net.inet.ip.forwarding to 0 if you don't have gateway_enable="YES" in your /etc/rc.conf I don't need devd so I just disabled it in rc.conf with devd_enable="NO". If you need it, just switch from sysctls to: gateway_enable="YES" ipv6_gateway_enable="YES" This seems as regression from 9.1 behavior for me for busy mpd-based BRAS'es as performance of the box drops significantly due to extra work performed by devd and its scripts.