Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-25 Thread Eric Dumazet
On 02/25/2019 08:08 PM, Hangbin Liu wrote: > Hi David, > On Mon, Feb 25, 2019 at 07:15:26PM -0700, David Ahern wrote: >> On 2/25/19 6:55 PM, Hangbin Liu wrote: >>> Just as I said, this issue only occurs when IPv6 is disabled at boot time >>> as there is no IPv6 route entry. Disable ipv6 on speci

Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-25 Thread Hangbin Liu
Hi David, On Mon, Feb 25, 2019 at 07:15:26PM -0700, David Ahern wrote: > On 2/25/19 6:55 PM, Hangbin Liu wrote: > > Just as I said, this issue only occurs when IPv6 is disabled at boot time > > as there is no IPv6 route entry. Disable ipv6 on specific interface should > > not be affected(IPv6 route

Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-25 Thread David Ahern
On 2/25/19 6:55 PM, Hangbin Liu wrote: > Just as I said, this issue only occurs when IPv6 is disabled at boot time > as there is no IPv6 route entry. Disable ipv6 on specific interface should > not be affected(IPv6 route/fib has inited). So I think use ipv6_mod_enabled() > would be more suitable in

Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-25 Thread Hangbin Liu
On Mon, Feb 25, 2019 at 09:57:42AM -0700, David Ahern wrote: > On 2/25/19 9:39 AM, Eric Dumazet wrote: > >>> On 02/24/2019 08:12 PM, Hangbin Liu wrote: > ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled > at running time. > >>> > >>> Why is it better exactly ? > >>>

Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-25 Thread Hangbin Liu
On Mon, Feb 25, 2019 at 08:39:27AM -0800, Eric Dumazet wrote: > >> On 02/24/2019 08:12 PM, Hangbin Liu wrote: > >>> ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled > >>> at running time. > >>> > >> > >> > >> Why is it better exactly ? > >> > >> IPv6 can be enabled on the hos

Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-25 Thread David Ahern
On 2/25/19 9:39 AM, Eric Dumazet wrote: > > > On 02/25/2019 12:17 AM, Hangbin Liu wrote: >> On Sun, Feb 24, 2019 at 08:24:51PM -0800, Eric Dumazet wrote: >>> >>> >>> On 02/24/2019 08:12 PM, Hangbin Liu wrote: ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled at run

Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-25 Thread Eric Dumazet
On 02/25/2019 12:17 AM, Hangbin Liu wrote: > On Sun, Feb 24, 2019 at 08:24:51PM -0800, Eric Dumazet wrote: >> >> >> On 02/24/2019 08:12 PM, Hangbin Liu wrote: >>> ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled >>> at running time. >>> >> >> >> Why is it better exactly ?

Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-25 Thread Hangbin Liu
On Sun, Feb 24, 2019 at 08:24:51PM -0800, Eric Dumazet wrote: > > > On 02/24/2019 08:12 PM, Hangbin Liu wrote: > > ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled > > at running time. > > > > > Why is it better exactly ? > > IPv6 can be enabled on the host, but disable

Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-24 Thread Eric Dumazet
On 02/24/2019 08:12 PM, Hangbin Liu wrote: > ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled > at running time. > Why is it better exactly ? IPv6 can be enabled on the host, but disabled per device /proc/sys/net/ipv6/conf/{name}/disable_ipv6 > Fixes: 173656accaf5 (

[PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

2019-02-24 Thread Hangbin Liu
ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled at running time. Fixes: 173656accaf5 ("sit: check if IPv6 enabled before calling ip6_err_gen_icmpv6_unreach()") Signed-off-by: Hangbin Liu --- net/ipv6/sit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git