netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: jamal <hadi@cyberus.ca>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	netdev <netdev@oss.sgi.com>
Subject: Re: [PATCH] RTNETLINK: Protocol family wildcard dumping for routing rules
Date: Fri, 8 Apr 2005 01:24:27 +0200	[thread overview]
Message-ID: <20050407232427.GY26731@postel.suug.ch> (raw)
In-Reply-To: <1112915616.1089.27.camel@jzny.localdomain>

* jamal <1112915616.1089.27.camel@jzny.localdomain> 2005-04-07 19:13
> On Thu, 2005-04-07 at 18:38, Thomas Graf wrote:
> > -	[RTM_GETNEIGH - RTM_BASE] = { .dumpit = neigh_dump_info	      }
> > +	[RTM_GETNEIGH - RTM_BASE] = { .dumpit = neigh_dump_info	      },
> > +	[RTM_GETRULE  - RTM_BASE] = { .dumpit = rtnetlink_dump_all    },
> >  };
> >  
> 
> Shouldnt this just work (without this change) if you have
> CONFIG_IP_MULTIPLE_TABLES?

Not sure what you mean, it doesn't even get into the routing
code but already fails in rtnetlink_rcv_msg when it doesn't
find a dumpit implementation for family == AF_UNSPEC.

> If you want to be funky and have some default dumper always,
> why not make the change to set dumpit to rtnetlink_dump_all in the code
> when dumpit is found to be NULL as a last resort?

That is exactly what happens, it will first look up the address
family dumpit and if none exist falls back to the rtnetlink_dump_all
introduced above.

	if (link->dumpit == NULL)
		link = &(rtnetlink_links[PF_UNSPEC][type]);

	if (link->dumpit == NULL)
		goto err_inval; /* <-- we used to fail here for PF_UNSPEC */

	if ((*errp = netlink_dump_start(rtnl, skb, nlh, ...

  reply	other threads:[~2005-04-07 23:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-07 21:38 [PATCH] RTNETLINK: Protocol family wildcard dumping for routing rules Thomas Graf
2005-04-07 22:09 ` Herbert Xu
2005-04-07 22:38   ` Thomas Graf
2005-04-07 23:13     ` jamal
2005-04-07 23:24       ` Thomas Graf [this message]
2005-04-08  0:48         ` jamal
2005-04-08  1:04           ` Thomas Graf
2005-04-08  1:11             ` jamal

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=20050407232427.GY26731@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=hadi@cyberus.ca \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@oss.sgi.com \
    /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).