diff mbox

fib_rules: fix suppressor names and default values

Message ID 20130803.104125.609502695540219854.davem@davemloft.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

David Miller Aug. 3, 2013, 5:41 p.m. UTC
From: David Miller <davem@davemloft.net>

Date: Sat, 03 Aug 2013 10:37:22 -0700 (PDT)

> From: Stefan Tomanek <stefan.tomanek@wertarbyte.de>

> Date: Sat, 3 Aug 2013 14:14:43 +0200

> 

>> This change brings the suppressor attribute names into line; it also changes

>> the data types to provide a more consistent interface.

>> 

>> While -1 indicates that the suppressor is not enabled, values >= 0 for

>> suppress_prefixlen or suppress_ifgroup  reject routing decisions violating the

>> constraint.

>> 

>> This changes the previously presented behaviour of suppress_prefixlen, where a

>> prefix length _less_ than the attribute value was rejected. After this change,

>> a prefix length less than *or* equal to the value is considered a violation of

>> the rule constraint.

>> 

>> It also changes the default values for default and newly added rules (disabling

>> any suppression for those).

>> 

>> Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>

> 

> Applied, thanks.


I had to fix the following obvious typo:


Are you even looking at the build of the code you are submitting?
Because here the compiler told me:

net/core/fib_rules.c: In function ‘fib_nl_newrule’:
net/core/fib_rules.c:354:3: warning: statement with no effect [-Wunused-value]

Comments

Stefan Tomanek Aug. 3, 2013, 6:28 p.m. UTC | #1
Dies schrieb David Miller (davem@davemloft.net):

> I had to fix the following obvious typo:
> 
> diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
> index 47916b0..2e65413 100644
> --- a/net/core/fib_rules.c
> +++ b/net/core/fib_rules.c
> @@ -351,7 +351,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh)
>  	if (tb[FRA_SUPPRESS_IFGROUP])
>  		rule->suppress_ifgroup = nla_get_u32(tb[FRA_SUPPRESS_IFGROUP]);
>  	else
> -		rule->suppress_ifgroup -1;
> +		rule->suppress_ifgroup = -1;
>  
>  	if (!tb[FRA_PRIORITY] && ops->default_pref)
>  		rule->pref = ops->default_pref(ops);
> 
> Are you even looking at the build of the code you are submitting?
> Because here the compiler told me:
> 
> net/core/fib_rules.c: In function ‘fib_nl_newrule’:
> net/core/fib_rules.c:354:3: warning: statement with no effect [-Wunused-value]

My apologies, I just checked my tinkering branch where the typo is not present;
it must have crept in while squashing together a number of smaller commits
while compiling the patch, perhaps while fixing some whitespace issue (empty
line).

The compiler message must have slipped by, I'll try to triple check next time.

Thank you for the quick fix.

Stefan Tomanek
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 47916b0..2e65413 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -351,7 +351,7 @@  static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh)
 	if (tb[FRA_SUPPRESS_IFGROUP])
 		rule->suppress_ifgroup = nla_get_u32(tb[FRA_SUPPRESS_IFGROUP]);
 	else
-		rule->suppress_ifgroup -1;
+		rule->suppress_ifgroup = -1;
 
 	if (!tb[FRA_PRIORITY] && ops->default_pref)
 		rule->pref = ops->default_pref(ops);