diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-12-10 22:30:46 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-12-10 22:30:46 +0100 |
commit | 6601a14831cdd32fc671ebc9dc299d2be427e489 (patch) | |
tree | 00b89854e36fbecd17443d09587c7cd80352893f /sysdep | |
parent | 2d0b7e24a52d51904faa8a8e96d68863491c110a (diff) | |
parent | 283c7dfada53a6dee6a8a17ecab492ffafd44b66 (diff) |
Merge branch 'add-path'
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 2 | ||||
-rw-r--r-- | sysdep/linux/netlink.c | 2 | ||||
-rw-r--r-- | sysdep/unix/krt.c | 13 |
3 files changed, 8 insertions, 9 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 84ce9c60..176e11ed 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -432,7 +432,7 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, int scan) net = net_get(p->p.table, idst, pxlen); rta a = { - .proto = &p->p, + .src = p->p.main_source, .source = RTS_INHERIT, .scope = SCOPE_UNIVERSE, .cast = RTC_UNICAST diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index df9ed622..ed8769b7 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -805,7 +805,7 @@ nl_parse_route(struct nlmsghdr *h, int scan) net *net = net_get(p->p.table, dst, i->rtm_dst_len); rta ra = { - .proto = &p->p, + .src= p->p.main_source, .source = RTS_INHERIT, .scope = SCOPE_UNIVERSE, .cast = RTC_UNICAST diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 8f24cf51..6fdef619 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -351,15 +351,14 @@ krt_learn_announce_update(struct krt_proto *p, rte *e) ee->pflags = 0; ee->pref = p->p.preference; ee->u.krt = e->u.krt; - rte_update(p->p.table, nn, &p->p, &p->p, ee); + rte_update(&p->p, nn, ee); } static void krt_learn_announce_delete(struct krt_proto *p, net *n) { n = net_find(p->p.table, n->n.prefix, n->n.pxlen); - if (n) - rte_update(p->p.table, n, &p->p, &p->p, NULL); + rte_update(&p->p, n, NULL); } /* Called when alien route is discovered during scan */ @@ -697,7 +696,7 @@ krt_export_rte(struct krt_proto *p, rte **new, ea_list **tmpa) if (filter == FILTER_ACCEPT) return 1; - struct proto *src = (*new)->attrs->proto; + struct proto *src = (*new)->attrs->src->proto; *tmpa = src->make_tmp_attrs ? src->make_tmp_attrs(*new, krt_filter_lp) : NULL; return f_run(filter, new, tmpa, krt_filter_lp, FF_FORCE_TMPATTR) <= F_ACCEPT; } @@ -939,7 +938,7 @@ krt_import_control(struct proto *P, rte **new, ea_list **attrs, struct linpool * struct krt_proto *p = (struct krt_proto *) P; rte *e = *new; - if (e->attrs->proto == P) + if (e->attrs->src->proto == P) return -1; if (!KRT_CF->devroutes && @@ -991,10 +990,10 @@ krt_init(struct proto_config *c) struct krt_proto *p = proto_new(c, sizeof(struct krt_proto)); p->p.accept_ra_types = RA_OPTIMAL; - p->p.make_tmp_attrs = krt_make_tmp_attrs; - p->p.store_tmp_attrs = krt_store_tmp_attrs; p->p.import_control = krt_import_control; p->p.rt_notify = krt_notify; + p->p.make_tmp_attrs = krt_make_tmp_attrs; + p->p.store_tmp_attrs = krt_store_tmp_attrs; p->p.rte_same = krt_rte_same; krt_sys_init(p); |