* [IPV6]: Fix routing by fwmark
@ 2006-08-26 11:11 Patrick McHardy
2006-08-26 11:39 ` YOSHIFUJI Hideaki / 吉藤英明
2006-08-26 23:50 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Patrick McHardy @ 2006-08-26 11:11 UTC (permalink / raw)
To: David S. Miller, Netdev Mailing List
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1252 bytes --]
[IPV6]: Fix routing by fwmark
Fix mark comparison, also dump the mask to userspace when the mask is zero,
but the mark is not (in which case the mark is dumped, so the mask is needed
to make sense of it).
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 829b107d9e4ef2bbbf2ccf25a748235739e9231e
tree 4ca98fb79f3e5e9cb0175ad9c074d9e4447735ac
parent 6963696ada0c98c53c2d59ca66944adb4d13e3a5
author Patrick McHardy <kaber@trash.net> Sat, 26 Aug 2006 13:12:32 +0200
committer Patrick McHardy <kaber@trash.net> Sat, 26 Aug 2006 13:12:32 +0200
net/ipv6/fib6_rules.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index ee4aa43..2fbc71d 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -129,7 +129,7 @@ static int fib6_rule_match(struct fib_ru
return 0;
#ifdef CONFIG_IPV6_ROUTE_FWMARK
- if ((r->fwmark ^ fl->fl6_fwmark) / r->fwmask)
+ if ((r->fwmark ^ fl->fl6_fwmark) & r->fwmask)
return 0;
#endif
@@ -256,7 +256,7 @@ #ifdef CONFIG_IPV6_ROUTE_FWMARK
if (rule6->fwmark)
NLA_PUT_U32(skb, FRA_FWMARK, rule6->fwmark);
- if (rule6->fwmask)
+ if (rule6->fwmask || rule6->fwmark)
NLA_PUT_U32(skb, FRA_FWMASK, rule6->fwmask);
#endif
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [IPV6]: Fix routing by fwmark
2006-08-26 11:11 [IPV6]: Fix routing by fwmark Patrick McHardy
@ 2006-08-26 11:39 ` YOSHIFUJI Hideaki / 吉藤英明
2006-08-26 23:50 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2006-08-26 11:39 UTC (permalink / raw)
To: kaber, davem; +Cc: netdev, yoshfuji
In article <44F02C5E.3070701@trash.net> (at Sat, 26 Aug 2006 13:11:26 +0200), Patrick McHardy <kaber@trash.net> says:
> Fix mark comparison, also dump the mask to userspace when the mask is zero,
> but the mark is not (in which case the mark is dumped, so the mask is needed
> to make sense of it).
>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
What a shame... Thank you for catching this.
--yoshfuji
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [IPV6]: Fix routing by fwmark
2006-08-26 11:11 [IPV6]: Fix routing by fwmark Patrick McHardy
2006-08-26 11:39 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2006-08-26 23:50 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2006-08-26 23:50 UTC (permalink / raw)
To: kaber; +Cc: netdev
Applied, thanks Patrick.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-08-26 23:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-26 11:11 [IPV6]: Fix routing by fwmark Patrick McHardy
2006-08-26 11:39 ` YOSHIFUJI Hideaki / 吉藤英明
2006-08-26 23:50 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).