Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167159501
D38213.id115786.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
792 B
Referenced Files
None
Subscribers
None
D38213.id115786.diff
View Options
diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c
--- a/sys/netlink/route/rt.c
+++ b/sys/netlink/route/rt.c
@@ -336,9 +336,9 @@
report_operation(uint32_t fibnum, struct rib_cmd_info *rc,
struct nlpcb *nlp, struct nlmsghdr *hdr)
{
- struct nl_writer nw;
-
+ struct nl_writer nw = {};
uint32_t group_id = family_to_group(rt_get_family(rc->rc_rt));
+
if (nlmsg_get_group_writer(&nw, NLMSG_SMALL, NETLINK_ROUTE, group_id)) {
struct route_nhop_data rnd = {
.rnd_nhop = rc_get_nhop(rc),
@@ -918,10 +918,9 @@
void
rtnl_handle_route_event(uint32_t fibnum, const struct rib_cmd_info *rc)
{
+ struct nl_writer nw = {};
int family, nlm_flags = 0;
- struct nl_writer nw;
-
family = rt_get_family(rc->rc_rt);
/* XXX: check if there are active listeners first */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 20, 2:00 PM (10 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36843429
Default Alt Text
D38213.id115786.diff (792 B)
Attached To
Mode
D38213: netlink: Zero-initialize writer structures allocated on the stack
Attached
Detach File
Event Timeline
Log In to Comment