[PATCH] Netlink: add krt_scope attribute

Vincent Bernat bernat at luffy.cx
Thu Sep 15 21:40:19 CEST 2016


 ❦ 15 septembre 2016 21:22 CEST, Vincent Bernat <bernat at luffy.cx> :

>> Thans for the patch. I agree that we should handle the attribute
>> if it has some usage. I have some questions/comments:
>>
>> Perhaps we should use the same approach like we use for krt_realm?
>> i.e., handle krt_scope as an integer variable and import constants
>> from /etc/iproute2/rt_scopes. So we could handle all values as the
>> Linux kernel and we would be consistent with iproute2 tools.
>
> I didn't know that scope names could be defined in this file. So, yes,
> we should.

Everything was already in place to use this file. So, the patch is now
simplified. While the scope is correctly imported for regular routes, it
is not for device routes. I still have to do:

protocol direct {
  table public;
  import filter {
    krt_scope = ips_link;
    accept "ok";
  };
  interface "eth0*", "eth1*";
}

I don't see why, I will investigate more tomorrow.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Netlink-add-krt_scope-attribute.patch
Type: text/x-diff
Size: 4260 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20160915/172ede22/attachment.patch>
-------------- next part --------------
-- 
Indent to show the logical structure of a program.
            - The Elements of Programming Style (Kernighan & Plauger)


More information about the Bird-users mailing list