From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Fernando Gont <fernando@gont.com.ar>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: Question about reading the routing table with netlink
Date: Wed, 11 Sep 2013 01:13:12 +0200 [thread overview]
Message-ID: <20130910231312.GC4794@order.stressinduktion.org> (raw)
In-Reply-To: <522F2AF8.9080106@gont.com.ar>
On Tue, Sep 10, 2013 at 11:21:44AM -0300, Fernando Gont wrote:
> Folks,
>
> Short version of the question:
> I'm trying to loop up a routing table entry with a
> socket(AF_NETLINK,SOCK_RAW,NETLINK_ROUTE).
>
> Everything seems fine, except that I do not quite understand what's the
> effect of setting the RTA_SRC attribute type when doing that.
It sets the source address for the routing table lookup. This is important if
e.g. rules are specified or if ipv6 subtrees are in use.
> Empirically, it seems that if the RTA_SRC attribute is set and it
> contains an address that is assigned to the interface involved in the
> route, then such address is later returned in the reply as an RTA_SRC
> attribute.
Hm, I thought that RTA_SRC only has a semantic in the request and is moslty
just copied over to the response.
Greetings,
Hannes
prev parent reply other threads:[~2013-09-10 23:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 14:21 Question about reading the routing table with netlink Fernando Gont
2013-09-10 23:13 ` Hannes Frederic Sowa [this message]
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=20130910231312.GC4794@order.stressinduktion.org \
--to=hannes@stressinduktion.org \
--cc=fernando@gont.com.ar \
--cc=netdev@vger.kernel.org \
/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