Re: net.inet.ip.forwarding is mysteriously set to 0

2015-04-27 Thread Paul Thornton

Hi

On 27/04/2015 06:41, Julian Elischer wrote:


Basically all the setup scripts in /etc/rc.d (andaother setup scripts in
/etc and /usr/local/etc)
all source /etc/rc.conf and it's friends (defaults etc.)
if any of thse scripts gets called (for example by devd when it notices
a new interface),
then the entire chain of dependencies related to that chain will be run
**according to how the config files tell it to run* *
and not how the current sysctls are set.
if you think about it, this must be the case as htey need to change the
sysctls as part of
their operation.

maybe we should have a script to do what you want and also uses sysrc(8)
to make it permanent.


I don't think this is a major problem to be honest.

The issue I had back in January is that the behaviour changed with an 
upgrade to 10.1 from 8.something as the interaction with devd wasn't 
well known.


I don't know how this can be dealt with unless we have a load of 
special-cases that log warnings when, for example, forwarding is enabled 
in sysctl.conf but there isn't a gateway_enable in rc.conf.  That sounds 
like a messy solution to be honest.


Paul.
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: net.inet.ip.forwarding is mysteriously set to 0

2015-04-26 Thread Julian Elischer

On 4/25/15 12:53 AM, wishmaster wrote:

Hi,

  --- Original Message ---
  From: Nikos Vassiliadis
  Date: 24 April 2015, 19:46:42
  




Hi,

Just saw this. Can somebody re-produce this?


root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 1
root@m4fh2:~ # ifconfig bridge0 create
root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 0


Basically all the setup scripts in /etc/rc.d (andaother setup scripts 
in /etc and /usr/local/etc)

all source /etc/rc.conf and it's friends (defaults etc.)
if any of thse scripts gets called (for example by devd when it 
notices a new interface),

then the entire chain of dependencies related to that chain will be run
**according to how the config files tell it to run* *
and not how the current sysctls are set.
if you think about it, this must be the case as htey need to change 
the sysctls as part of

their operation.

maybe we should have a script to do what you want and also uses 
sysrc(8) to make it permanent.





That's on GENERIC 10-STABLE from the day before yesterday.


Put
  gateway_enable=YES
into rc.conf and try again.

Cheers,
Vitaliy
  
___

freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org




___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


net.inet.ip.forwarding is mysteriously set to 0

2015-04-24 Thread Nikos Vassiliadis

Hi,

Just saw this. Can somebody re-produce this?


root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 1
root@m4fh2:~ # ifconfig bridge0 create
root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 0


That's on GENERIC 10-STABLE from the day before yesterday.

Thanks,
Nikos
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: net.inet.ip.forwarding is mysteriously set to 0

2015-04-24 Thread Gary Palmer
On Sat, Apr 25, 2015 at 01:47:50AM +0900, Paul S. wrote:
 Can confirm that anything to do with netif restart on a forwarding 
 interface also creates the same problem.
 
 On 4/25/2015 ?? 01:46, Nikos Vassiliadis wrote:
  Hi,
 
  Just saw this. Can somebody re-produce this?
 
  root@m4fh2:~ # sysctl net.inet.ip.forwarding
  net.inet.ip.forwarding: 1
  root@m4fh2:~ # ifconfig bridge0 create
  root@m4fh2:~ # sysctl net.inet.ip.forwarding
  net.inet.ip.forwarding: 0
 
  That's on GENERIC 10-STABLE from the day before yesterday.
 
  Thanks,
  Nikos

What is your setting for gateway_enable in /etc/rc.conf?

Gary
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: net.inet.ip.forwarding is mysteriously set to 0

2015-04-24 Thread Paul Thornton

Hi

This happens when any interface is created if you've enabled forwarding 
with the sysctl and not using gateway_enable in rc.conf.  It is easily 
fixed though.


See this thread from January:
https://docs.freebsd.org/cgi/getmsg.cgi?fetch=403720+0+archive/2015/freebsd-net/20150104.freebsd-net

Paul.

On 24/04/2015 17:47, Paul S. wrote:

Can confirm that anything to do with netif restart on a forwarding
interface also creates the same problem.

On 4/25/2015 午前 01:46, Nikos Vassiliadis wrote:

Hi,

Just saw this. Can somebody re-produce this?


root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 1
root@m4fh2:~ # ifconfig bridge0 create
root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 0


That's on GENERIC 10-STABLE from the day before yesterday.

Thanks,
Nikos
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org

Re: net.inet.ip.forwarding is mysteriously set to 0

2015-04-24 Thread Paul S.
Can confirm that anything to do with netif restart on a forwarding 
interface also creates the same problem.


On 4/25/2015 午前 01:46, Nikos Vassiliadis wrote:

Hi,

Just saw this. Can somebody re-produce this?


root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 1
root@m4fh2:~ # ifconfig bridge0 create
root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 0


That's on GENERIC 10-STABLE from the day before yesterday.

Thanks,
Nikos
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org

Re: net.inet.ip.forwarding is mysteriously set to 0

2015-04-24 Thread wishmaster
Hi,

 --- Original Message ---
 From: Nikos Vassiliadis 
 Date: 24 April 2015, 19:46:42
 


 Hi,
 
 Just saw this. Can somebody re-produce this?
 
  root@m4fh2:~ # sysctl net.inet.ip.forwarding
  net.inet.ip.forwarding: 1
  root@m4fh2:~ # ifconfig bridge0 create
  root@m4fh2:~ # sysctl net.inet.ip.forwarding
  net.inet.ip.forwarding: 0
 
 That's on GENERIC 10-STABLE from the day before yesterday.
 

Put
 gateway_enable=YES
into rc.conf and try again.

Cheers,
Vitaliy 
 
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: net.inet.ip.forwarding is mysteriously set to 0

2015-04-24 Thread Nikos Vassiliadis



On 04/24/15 18:54, Gary Palmer wrote:

On Sat, Apr 25, 2015 at 01:47:50AM +0900, Paul S. wrote:

Can confirm that anything to do with netif restart on a forwarding
interface also creates the same problem.

On 4/25/2015 ?? 01:46, Nikos Vassiliadis wrote:

Hi,

Just saw this. Can somebody re-produce this?


root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 1
root@m4fh2:~ # ifconfig bridge0 create
root@m4fh2:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 0


That's on GENERIC 10-STABLE from the day before yesterday.

Thanks,
Nikos


What is your setting for gateway_enable in /etc/rc.conf?


Thanks Gary,

I was not using anything in rc.conf. I was just using
the sysctl in /etc/sysctl.conf. Setting gateway_enable to yes
fixes the issue.

I am kind of surprised. Is this behaviour new?


___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org


Re: net.inet.ip.forwarding is mysteriously set to 0

2015-04-24 Thread Nikos Vassiliadis



On 04/24/15 18:57, Paul Thornton wrote:

Hi

This happens when any interface is created if you've enabled forwarding
with the sysctl and not using gateway_enable in rc.conf.  It is easily
fixed though.

See this thread from January:
https://docs.freebsd.org/cgi/getmsg.cgi?fetch=403720+0+archive/2015/freebsd-net/20150104.freebsd-net


Ok, thanks for the pointer. Everything is clear now.

Nikos

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org