Re: [PATCH] ipv6 addrconf: disallow rtr_solicits < -1

2016-10-06 Thread Cong Wang
On Mon, Oct 3, 2016 at 11:40 PM, Maciej Żenczykowski wrote: >> Please remove the const qualifier and the casts to be consistent >> with how we handle this elsewhere. >> >> Thanks. > > I can of course trivially make that change. > > But: > > (on net-next/master) > git grep

Re: [PATCH] ipv6 addrconf: disallow rtr_solicits < -1

2016-10-04 Thread Maciej Żenczykowski
> Please remove the const qualifier and the casts to be consistent > with how we handle this elsewhere. > > Thanks. I can of course trivially make that change. But: (on net-next/master) git grep 'extra[12].*=.*\(void *[*]\)' currently finds 45 matches, and this patch adds a 46th. In

Re: [PATCH] ipv6 addrconf: disallow rtr_solicits < -1

2016-10-03 Thread David Miller
From: Maciej Żenczykowski Date: Sun, 2 Oct 2016 23:41:57 -0700 > From: Maciej Żenczykowski > > This disallows setting /proc/sys/net/ipv6/conf/*/router_solicitations > to values below -1. > > -1 continues to mean an unlimited number of retransmits. >

Re: [PATCH] ipv6 addrconf: disallow rtr_solicits < -1

2016-10-03 Thread Cong Wang
On Mon, Oct 3, 2016 at 1:01 PM, Maciej Żenczykowski wrote: > It is if you don't want build warnings about discarding 'const' qualifier. Why do you need to mark it as const? We don't do this in sysctl_net_ipv4.c.

Re: [PATCH] ipv6 addrconf: disallow rtr_solicits < -1

2016-10-03 Thread Maciej Żenczykowski
It is if you don't want build warnings about discarding 'const' qualifier.

Re: [PATCH] ipv6 addrconf: disallow rtr_solicits < -1

2016-10-03 Thread Cong Wang
On Sun, Oct 2, 2016 at 11:41 PM, Maciej Żenczykowski wrote: > +static const int minus_one = -1; > static const int one = 1; > static const int two_five_five = 255; > > @@ -5789,7 +5790,8 @@ static const struct ctl_table addrconf_sysctl[] = { > .data

[PATCH] ipv6 addrconf: disallow rtr_solicits < -1

2016-10-03 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This disallows setting /proc/sys/net/ipv6/conf/*/router_solicitations to values below -1. -1 continues to mean an unlimited number of retransmits. Note: this depends on 'ipv6 addrconf: remove addrconf_sysctl_hop_limit()' Signed-off-by: Maciej