summaryrefslogtreecommitdiff
path: root/net/key
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-01-25 20:49:14 -0800
committerDavid S. Miller <davem@davemloft.net>2009-01-25 20:49:14 -0800
commita8d694c651356ec89452e15b0189c061fb7e1cf1 (patch)
tree58c33e52bf6aeda0a230eb2f7797051c46d83947 /net/key
parente918085aaff34086e265f825dd469926b1aec4a4 (diff)
af_key: initialize xfrm encap_oa
Currently encap_oa is left uninitialized, so it contains garbage data which is visible to userland via Netlink. Initialize it by zeroing it out. Signed-off-by: Timo Teras <timo.teras@iki.fi> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index f8bd8df5e257..7dcbde3ea7d9 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1285,6 +1285,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net,
ext_hdrs[SADB_X_EXT_NAT_T_DPORT-1];
natt->encap_dport = n_port->sadb_x_nat_t_port_port;
}
+ memset(&natt->encap_oa, 0, sizeof(natt->encap_oa));
}
err = xfrm_init_state(x);