[PATCH] Netlink: add krt_scope attribute

Ondrej Zajicek santiago at crfreenet.org
Fri Sep 16 11:33:57 CEST 2016


On Thu, Sep 15, 2016 at 10:36:11PM +0200, Ondrej Zajicek wrote:
> On Thu, Sep 15, 2016 at 09:22:02PM +0200, Vincent Bernat wrote:
> > > I though that kernel sets scope link automatically for device routes,
> > > but in reality it is done by ip tool. Perhaps we should do that too.
> > 
> > For device routes created by the kernel, scope is link, but if you
> > create them manually, you get a global scope.
> 
> My point was that 'ip' tool does that automatically for users:
> 
> # ip r a 10.1.1.0/24 dev eth0
> # ip r l
> 10.1.1.0/24 dev eth0  scope link 
> 
> Perhaps we should do that too. The fact that we do not set link scope
> for device routes sent to kernel is probably an oversight, not by design.

Here is an attached patch, which does that. Does it work for you?

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scope-attr.patch
Type: text/x-diff
Size: 4446 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20160916/0e70d05a/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20160916/0e70d05a/attachment.asc>


More information about the Bird-users mailing list