summaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-09 22:04:27 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-09 22:04:27 -0800
commitf47273e5c8f679220091335e0bed79e46237cfda (patch)
tree6a6e3d37210e723524deae2991e399e2c15d4d79 /net/ipv4/devinet.c
parentf4cd87aabb51fcc709b0dacc05b718c400c64172 (diff)
parentd2b02ed9487ed25832d19534575052e43f8e0c4f (diff)
downloadop-kernel-dev-f47273e5c8f679220091335e0bed79e46237cfda.zip
op-kernel-dev-f47273e5c8f679220091335e0bed79e46237cfda.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPV6] fix ipv6_getsockopt_sticky copy_to_user leak [IPV6]: Fix for ipv6_setsockopt NULL dereference [DCCP]: Initialise write_xmit_timer also on passive sockets [IPV4]: Fix rtm_to_ifaddr() error handling.
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index e10794d..98a00d0 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -502,8 +502,10 @@ static struct in_ifaddr *rtm_to_ifaddr(struct nlmsghdr *nlh)
goto errout;
ifm = nlmsg_data(nlh);
- if (ifm->ifa_prefixlen > 32 || tb[IFA_LOCAL] == NULL)
+ if (ifm->ifa_prefixlen > 32 || tb[IFA_LOCAL] == NULL) {
+ err = -EINVAL;
goto errout;
+ }
dev = __dev_get_by_index(ifm->ifa_index);
if (dev == NULL) {
OpenPOWER on IntegriCloud