summaryrefslogtreecommitdiff
path: root/sysdep/linux/krt-scan.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-07-05 17:50:19 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-07-05 17:50:19 +0200
commitcfe34a316e35a209fcd814ccf3523c262e8d4b0a (patch)
tree29046cfeb797ade6a3c879b5d58f93cd414ab14d /sysdep/linux/krt-scan.c
parent824de84d48eff6cbd0c550309fbd0bbf7740cb14 (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/krt-scan.c')
-rw-r--r--sysdep/linux/krt-scan.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sysdep/linux/krt-scan.c b/sysdep/linux/krt-scan.c
index feb128ef..8591607e 100644
--- a/sysdep/linux/krt-scan.c
+++ b/sysdep/linux/krt-scan.c
@@ -48,7 +48,6 @@ krt_parse_entry(byte *ent, struct krt_proto *p)
int masklen;
net *net;
byte *iface = ent;
- rta a;
rte *e;
if (sscanf(ent, "%*s\t%x\t%x\t%x\t%*d\t%*d\t%*d\t%x\t", &dest0, &gw0, &flags, &mask0) != 4)
@@ -88,14 +87,12 @@ krt_parse_entry(byte *ent, struct krt_proto *p)
net = net_get(p->p.table, dest, masklen);
- a.proto = &p->p;
- a.source = RTS_INHERIT;
- a.scope = SCOPE_UNIVERSE;
- a.cast = RTC_UNICAST;
- a.flags = a.aflags = 0;
- a.from = IPA_NONE;
- a.iface = NULL;
- a.eattrs = NULL;
+ rta a = {
+ .proto = &p->p,
+ .source = RTS_INHERIT,
+ .scope = SCOPE_UNIVERSE,
+ .cast = RTC_UNICAST
+ };
if (flags & RTF_GATEWAY)
{