diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-05 17:50:19 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-05 17:50:19 +0200 |
commit | cfe34a316e35a209fcd814ccf3523c262e8d4b0a (patch) | |
tree | 29046cfeb797ade6a3c879b5d58f93cd414ab14d /sysdep/linux/netlink/netlink.c | |
parent | 824de84d48eff6cbd0c550309fbd0bbf7740cb14 (diff) |
Implements hostcache and recursive next hops.
Hostcache is a structure for monitoring changes in a routing table that
is used for routes with dynamic/recursive next hops. This is needed for
proper iBGP next hop handling.
Diffstat (limited to 'sysdep/linux/netlink/netlink.c')
-rw-r--r-- | sysdep/linux/netlink/netlink.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index a10a2e9f..2dd0359b 100644 --- a/sysdep/linux/netlink/netlink.c +++ b/sysdep/linux/netlink/netlink.c @@ -570,7 +570,6 @@ nl_parse_route(struct nlmsghdr *h, int scan) struct rtattr *a[RTA_CACHEINFO+1]; int new = h->nlmsg_type == RTM_NEWROUTE; ip_addr dst; - rta ra; rte *e; net *net; u32 oif; @@ -655,15 +654,13 @@ nl_parse_route(struct nlmsghdr *h, int scan) } net = net_get(p->p.table, dst, i->rtm_dst_len); - ra.proto = &p->p; - ra.source = RTS_INHERIT; - ra.scope = SCOPE_UNIVERSE; - ra.cast = RTC_UNICAST; - ra.flags = ra.aflags = 0; - ra.from = IPA_NONE; - ra.gw = IPA_NONE; - ra.iface = NULL; - ra.eattrs = NULL; + + rta ra = { + .proto = &p->p, + .source = RTS_INHERIT, + .scope = SCOPE_UNIVERSE, + .cast = RTC_UNICAST + }; switch (i->rtm_type) { |