ifconfig greX create disables IPv6 forwarding

2015-02-09 Thread Daniel Corbe

For some reason, every time I create a GRE interface on a FreeBSD IPv6
gateway, net.inet6.ip6.forwarding is disabled.  As long as I manually
re-enable it with sysctl, both the GRE tunnel and the IPv6 network
behind this machine will continue to work; however, it's certainly far
from ideal.

There's nothing in the log to indicate exactly what's going on here:

Feb  9 11:23:08 router rtadvd[27251]: interface added (idx=8)
Feb  9 11:23:08 router devd: Executing '/etc/pccard_ether gre0 start'
Feb  9 11:23:21 router rtadvd[27251]: non-zero lifetime RA but 
net.inet6.ip6.forwarding=0.  Ignored.
Feb  9 11:23:53 router last message repeated 2 times

Nor is there anything about it in dmesg.

# uname -a
FreeBSD router.corbe.net 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 
11 21:02:49 UTC 2014 
r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

-DAniel
___
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: ifconfig greX create disables IPv6 forwarding

2015-02-09 Thread Paul Thornton

On 09/02/2015 16:34, Daniel Corbe wrote:


For some reason, every time I create a GRE interface on a FreeBSD IPv6
gateway, net.inet6.ip6.forwarding is disabled.  As long as I manually
re-enable it with sysctl, both the GRE tunnel and the IPv6 network
behind this machine will continue to work; however, it's certainly far
from ideal.

I stumbled acro

I discovered this in January.  See this thread:

http://lists.freebsd.org/pipermail/freebsd-net/2015-January/040797.html

Are you enabling forwarding using ipv6_gateway_enable in rc.conf, or are 
you just setting net.inet6.ip6.forwarding to 1 in sysctl.conf?


devd gets involved running /etc/rc.d/netif start and that seems to check 
(and set) the forwarding sysctls based on the rc.conf entries - so if 
you've set them manually they get reset when a new interface is 
brought up.


Adding ipv6_gateway_enable=YES in /etc/rc.conf should fix this.

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: ifconfig greX create disables IPv6 forwarding

2015-02-09 Thread Daniel Corbe
Paul Thornton p...@prt.org writes:

 On 09/02/2015 16:34, Daniel Corbe wrote:

 For some reason, every time I create a GRE interface on a FreeBSD IPv6
 gateway, net.inet6.ip6.forwarding is disabled.  As long as I manually
 re-enable it with sysctl, both the GRE tunnel and the IPv6 network
 behind this machine will continue to work; however, it's certainly far
 from ideal.
 I stumbled acro

 I discovered this in January.  See this thread:

 http://lists.freebsd.org/pipermail/freebsd-net/2015-January/040797.html

 Are you enabling forwarding using ipv6_gateway_enable in rc.conf, or
 are you just setting net.inet6.ip6.forwarding to 1 in sysctl.conf?

 devd gets involved running /etc/rc.d/netif start and that seems to
 check (and set) the forwarding sysctls based on the rc.conf entries -
 so if you've set them manually they get reset when a new interface
 is brought up.

 Adding ipv6_gateway_enable=YES in /etc/rc.conf should fix this.


Embarrassingly enough, the problem wound up being I had
ipv6_enable_gateway instead of ipv6_gateway_enable.  I'm also setting
net.inet6.ip6.forwarding=1 manually in sysctl.conf so that's sort of
why it ever worked to begin with.

Thanks though.  Some times all you need is a second set of eyes on a
problem.

-Daniel
___
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