Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

in the process of IPV6_LEAVE_GROUP, catch explictly the case of

ipv6mr_interface != 0 but ifp == NULL.
the previous code was not dangerous, but was incorrect.
  • Loading branch information...
commit 9c5bfaf4740cc080378da5d3fffa1a1fce6a916d 1 parent 70f4208
jinmei authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 kame/sys/netinet6/ip6_output.c
View
12 kame/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $KAME: ip6_output.c,v 1.431 2004/02/28 06:37:04 jinmei Exp $ */
+/* $KAME: ip6_output.c,v 1.432 2004/02/28 10:22:51 jinmei Exp $ */
/*
* Copyright (c) 2002 INRIA. All rights reserved.
@@ -3815,7 +3815,15 @@ ip6_setmoptions(optname, im6op, m)
error = EADDRNOTAVAIL;
break;
}
- } else {
+ } else if (mreq->ipv6mr_interface != 0) {
+ /*
+ * This case happens when the (positive) index is in
+ * the valid range, but the corresponding interface has
+ * been detached dynamically (XXX).
+ */
+ error = EADDRNOTAVAIL;
+ break;
+ } else { /* ipv6mr_interface == 0 */
/*
* The API spec says as follows:
* If the interface index is specified as 0, the
Please sign in to comment.
Something went wrong with that request. Please try again.