diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-07-24 15:38:32 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-07-24 15:38:32 +0200 |
commit | cec40a74679821513e627f93b924067a404f6475 (patch) | |
tree | 793bbe5b326e7008e4657cf11b2937cafbe3d922 /sysdep/linux/netlink.c | |
parent | 18f70a6229f586d5e4f387075be42d7a1ef5d269 (diff) | |
parent | 8263690e754a83b8f3c58bd0080a1628d6cba556 (diff) |
Merge remote-tracking branch 'origin/mq-filter-stack'
Diffstat (limited to 'sysdep/linux/netlink.c')
-rw-r--r-- | sysdep/linux/netlink.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index 05328663..10e9a18b 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -1740,9 +1740,12 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h) ea->attrs[0].id = EA_KRT_PREFSRC; ea->attrs[0].flags = 0; ea->attrs[0].type = EAF_TYPE_IP_ADDRESS; - ea->attrs[0].u.ptr = lp_alloc(s->pool, sizeof(struct adata) + sizeof(ps)); - ea->attrs[0].u.ptr->length = sizeof(ps); - memcpy(ea->attrs[0].u.ptr->data, &ps, sizeof(ps)); + + struct adata *ad = lp_alloc(s->pool, sizeof(struct adata) + sizeof(ps)); + ad->length = sizeof(ps); + memcpy(ad->data, &ps, sizeof(ps)); + + ea->attrs[0].u.ptr = ad; } if (a[RTA_FLOW]) |