netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Luciano Ruete <luciano@lugmen.org.ar>
Cc: lartc@mailman.ds9a.nl, Linux Netdev List <netdev@vger.kernel.org>,
	Thomas Graf <tgraf@suug.ch>
Subject: Re: [LARTC] [BUG?] ip ru flush && RTNETLINK answers: Numerical result out of range
Date: Mon, 19 Mar 2007 06:54:15 +0100	[thread overview]
Message-ID: <45FE2587.3050205@trash.net> (raw)
In-Reply-To: <200703190046.47021.luciano@lugmen.org.ar>

Luciano Ruete wrote:
> After an: 
> # ip ru flush
> I loose all my ip rules but the priority 0 one. 
> root@sarasvati:~# ip ru
> 0:      from all lookup 255
> root@sarasvati:~#  
> 
> Ok with that, but now i'm not able to insert any new rule.
> This leads to a total loose of conectivity.
> 
> root@sarasvati:~# ip ru add from all table default
> RTNETLINK answers: Numerical result out of range
> root@sarasvati:~# ip ru add from all lookup main
> RTNETLINK answers: Numerical result out of range
> 
> Even seting the priority value by hand, i got the same error:
> 
> root@sarasvati:~# ip ru add from all lookup main priority 32766
> RTNETLINK answers: Numerical result out of range
> 
> To be able to send this e-mail without rebooting i had to insert my gw ip 
> routes in table 255.
> 
> Is this a bug in iproute?
> 
> Some adiotional data:
> ip utility, iproute2-ss060323
> Linux sarasvati 2.6.20-5-386 #2 Sat Jan 6 14:44:57 UTC 2007 i686 GNU/Linux


The problem seems to be the nla policy added in 2.6.19 or 2.6.20.
When specifying a prefix as "all", iproute adds a zero byte long
attribute (FRA_SRC in this case). The IPv4 fib_rules policy states
that it has to be exactly 4 bytes long, which makes validation fail.
This also affects IPv6 and DECnet.

I would argue that iproute is broken and shouldn't add a zero
byte long attribute, but we still need to make sure the kernel
accepts these attributes as valid.

Thomas, I can't see a clean way to fix this right now that
doesn't either bloat struct nla_policy or removes FRA_SRC/FRA_DST
from the policy, could you please look into this? Thanks.


       reply	other threads:[~2007-03-19  5:54 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 ` Patrick McHardy [this message]
2007-03-19 15:25   ` [LARTC] [BUG?] ip ru flush && RTNETLINK answers: Numerical result out of range 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
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=45FE2587.3050205@trash.net \
    --to=kaber@trash.net \
    --cc=lartc@mailman.ds9a.nl \
    --cc=luciano@lugmen.org.ar \
    --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).