0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-05 08:31:53 +00:00

Netlink: Fixes uninitialized variable

Thanks to Pavel Tvrdik for the bugfix
This commit is contained in:
Ondrej Zajicek 2015-07-28 12:35:12 +02:00 committed by Pavel Tvrdík
parent e0176f2639
commit 0f38795b33

View File

@ -100,11 +100,12 @@ nl_request_dump(int af, int cmd)
struct { struct {
struct nlmsghdr nh; struct nlmsghdr nh;
struct rtgenmsg g; struct rtgenmsg g;
} req; } req = {
req.nh.nlmsg_type = cmd; .nh.nlmsg_type = cmd,
req.nh.nlmsg_len = sizeof(req); .nh.nlmsg_len = sizeof(req),
req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP; .nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP,
req.g.rtgen_family = af; .g.rtgen_family = af
};
nl_send(&nl_scan, &req.nh); nl_send(&nl_scan, &req.nh);
} }