summaryrefslogtreecommitdiff
path: root/sysdep/linux/netlink.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2020-04-10 17:08:29 +0200
committerMaria Matejka <mq@ucw.cz>2021-10-13 19:09:04 +0200
commit5cff1d5f022755df61af6fc21cc4f2e5d384404e (patch)
treed98b4b352a47257fe3943dcb050ff73c5c14aecf /sysdep/linux/netlink.c
parenteb937358c087eaeb6f209660cc7ecfe6d6eff739 (diff)
Route: moved rte_src pointer from rta to rte
It is an auxiliary key in the routing table, not a route attribute.
Diffstat (limited to 'sysdep/linux/netlink.c')
-rw-r--r--sysdep/linux/netlink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index fdf3f2db..ac092871 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -1488,7 +1488,7 @@ nl_mergable_route(struct nl_parse_state *s, net *net, struct krt_proto *p, uint
static void
nl_announce_route(struct nl_parse_state *s)
{
- rte *e = rte_get_temp(s->attrs);
+ rte *e = rte_get_temp(s->attrs, s->proto->p.main_source);
e->net = s->net;
e->u.krt.src = s->krt_src;
e->u.krt.proto = s->krt_proto;
@@ -1659,7 +1659,6 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
nl_announce_route(s);
rta *ra = lp_allocz(s->pool, RTA_MAX_SIZE);
- ra->src = p->p.main_source;
ra->source = RTS_INHERIT;
ra->scope = SCOPE_UNIVERSE;