From: Patrick McHardy <kaber@trash.net>
To: Thomas Graf <tgraf@suug.ch>
Cc: Linux Netdev List <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
lartc@mailman.ds9a.nl
Subject: Re: [NET]: Fix fib_rules compatibility breakage
Date: Tue, 20 Mar 2007 17:59:44 +0100 [thread overview]
Message-ID: <46001300.90804@trash.net> (raw)
In-Reply-To: <20070320164004.GN521@postel.suug.ch>
Thomas Graf wrote:
> @@ -242,10 +239,10 @@ static int fib4_rule_compare(struct fib_
> return 0;
> #endif
>
> - if (tb[FRA_SRC] && (rule4->src != nla_get_be32(tb[FRA_SRC])))
> + if (frh->src_len && (rule4->src != nla_get_be32(tb[FRA_SRC])))
> return 0;
>
> - if (tb[FRA_DST] && (rule4->dst != nla_get_be32(tb[FRA_DST])))
> + if (frh->dst_len && (rule4->dst != nla_get_be32(tb[FRA_DST])))
> return 0;
>
The presence of the attributes when src_len/dst_len is non-zero
is only verified in fib_newrule, so this looks like it might crash
when something broken sets src_len/dst_len to a non-zero value
without actually adding the attributes.
Other than that it looks fine.
next prev parent reply other threads:[~2007-03-20 16:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200703190046.47021.luciano@lugmen.org.ar>
2007-03-19 5:54 ` [LARTC] [BUG?] ip ru flush && RTNETLINK answers: Numerical result out of range Patrick McHardy
2007-03-19 15:25 ` Thomas Graf
2007-03-20 6:19 ` Patrick McHardy
2007-03-20 6:42 ` [LARTC] " Patrick McHardy
2007-03-20 16:40 ` [NET]: Fix fib_rules compatibility breakage Thomas Graf
2007-03-20 16:59 ` Patrick McHardy [this message]
2007-03-20 18:15 ` Thomas Graf
2007-03-20 19:58 ` Patrick McHardy
2007-03-24 19:48 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46001300.90804@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=lartc@mailman.ds9a.nl \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).