--- a/src/libnetfilter_log.c 2010-11-04 00:19:45.000000000 +0100 +++ b/src/libnetfilter_log.c 2014-01-03 10:48:34.592783388 +0100 @@ -133,6 +133,8 @@ __build_send_cfg_msg(struct nflog_handle struct nlmsghdr nmh; } u; struct nfulnl_msg_config_cmd cmd; + + memset(&u, 0, sizeof(u)); nfnl_fill_hdr(h->nfnlssh, &u.nmh, 0, pf, groupnum, NFULNL_MSG_CONFIG, NLM_F_REQUEST|NLM_F_ACK); @@ -469,12 +471,14 @@ int nflog_set_mode(struct nflog_g_handle struct nlmsghdr nmh; } u; struct nfulnl_msg_config_mode params; - + memset(&u, 0, sizeof(u)); + nfnl_fill_hdr(gh->h->nfnlssh, &u.nmh, 0, AF_UNSPEC, gh->id, NFULNL_MSG_CONFIG, NLM_F_REQUEST|NLM_F_ACK); params.copy_range = htonl(range); /* copy_range is short */ params.copy_mode = mode; + params._pad = (u_int8_t) 0; nfnl_addattr_l(&u.nmh, sizeof(u), NFULA_CFG_MODE, ¶ms, sizeof(params)); @@ -500,6 +504,8 @@ int nflog_set_timeout(struct nflog_g_han struct nlmsghdr nmh; } u; + memset(&u, 0, sizeof(u)); + nfnl_fill_hdr(gh->h->nfnlssh, &u.nmh, 0, AF_UNSPEC, gh->id, NFULNL_MSG_CONFIG, NLM_F_REQUEST|NLM_F_ACK); @@ -525,6 +531,8 @@ int nflog_set_qthresh(struct nflog_g_han struct nlmsghdr nmh; } u; + memset(&u, 0, sizeof(u)); + nfnl_fill_hdr(gh->h->nfnlssh, &u.nmh, 0, AF_UNSPEC, gh->id, NFULNL_MSG_CONFIG, NLM_F_REQUEST|NLM_F_ACK); @@ -553,8 +561,10 @@ int nflog_set_nlbufsiz(struct nflog_g_ha char buf[NFNL_HEADER_LEN+NFA_LENGTH(sizeof(u_int32_t))]; struct nlmsghdr nmh; } u; - int status; + int status = 0; + memset(&u, 0, sizeof(u)); + nfnl_fill_hdr(gh->h->nfnlssh, &u.nmh, 0, AF_UNSPEC, gh->id, NFULNL_MSG_CONFIG, NLM_F_REQUEST|NLM_F_ACK); @@ -588,6 +598,8 @@ int nflog_set_flags(struct nflog_g_handl struct nlmsghdr nmh; } u; + memset(&u, 0, sizeof(u)); + nfnl_fill_hdr(gh->h->nfnlssh, &u.nmh, 0, AF_UNSPEC, gh->id, NFULNL_MSG_CONFIG, NLM_F_REQUEST|NLM_F_ACK);