summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorDavid S. Miller2010-03-20 23:24:29 +0100
committerDavid S. Miller2010-03-20 23:24:29 +0100
commite77c8e83dd587f2616d7ff20d23a897891e6e20d (patch)
treeba5d2ce6541119f329b2fd51181aaae8528b38f0 /net/ipv6
parentenic: Clean up: Change driver description; Fix tab space; Update MAINTAINERS (diff)
parentMerge branch 'vhost' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost (diff)
downloadkernel-qcow2-linux-e77c8e83dd587f2616d7ff20d23a897891e6e20d.tar.gz
kernel-qcow2-linux-e77c8e83dd587f2616d7ff20d23a897891e6e20d.tar.xz
kernel-qcow2-linux-e77c8e83dd587f2616d7ff20d23a897891e6e20d.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6mr.c3
-rw-r--r--net/ipv6/route.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 52e0f74fdfe0..23e4ac0cc30e 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1113,6 +1113,9 @@ static int ip6mr_mfc_add(struct net *net, struct mf6cctl *mfc, int mrtsock)
unsigned char ttls[MAXMIFS];
int i;
+ if (mfc->mf6cc_parent >= MAXMIFS)
+ return -ENFILE;
+
memset(ttls, 255, MAXMIFS);
for (i = 0; i < MAXMIFS; i++) {
if (IF_ISSET(i, &mfc->mf6cc_ifset))
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 52cd3eff31dc..7fcb0e5d1213 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -879,7 +879,7 @@ static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie)
rt = (struct rt6_info *) dst;
- if (rt && rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie))
+ if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie))
return dst;
return NULL;