diff options
author | Cyrill Gorcunov <gorcunov@openvz.org> | 2009-11-08 06:51:19 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-11 05:54:41 +0100 |
commit | 13cfa97bef0f1172879f98307ac716acf3e9cea9 (patch) | |
tree | 012d5da286e39fbe94c7b100be9153a49191bd7e /net/netlink | |
parent | usbnet: Set link down initially for drivers that update link state (diff) | |
download | linux-13cfa97bef0f1172879f98307ac716acf3e9cea9.tar.xz linux-13cfa97bef0f1172879f98307ac716acf3e9cea9.zip |
net: netlink_getname, packet_getname -- use DECLARE_SOCKADDR guard
Use guard DECLARE_SOCKADDR in a few more places which allow
us to catch if the structure copied back is too big.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/af_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index aea805c98da3..f30d596dbc58 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -708,7 +708,7 @@ static int netlink_getname(struct socket *sock, struct sockaddr *addr, { struct sock *sk = sock->sk; struct netlink_sock *nlk = nlk_sk(sk); - struct sockaddr_nl *nladdr = (struct sockaddr_nl *)addr; + DECLARE_SOCKADDR(struct sockaddr_nl *, nladdr, addr); nladdr->nl_family = AF_NETLINK; nladdr->nl_pad = 0; |