Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

the latest check in nd6_setdefaultiface() was too strong; we should a…

…llow

the case of ifindex = 0 for 'ndp -I delete'.
  • Loading branch information...
commit 3afe823469331c0176cd6e8eceee53031303b314 1 parent 8a54f02
jinmei authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 kame/sys/netinet6/nd6_rtr.c
View
6 kame/sys/netinet6/nd6_rtr.c
@@ -1,4 +1,4 @@
-/* $KAME: nd6_rtr.c,v 1.240 2003/12/08 10:05:54 itojun Exp $ */
+/* $KAME: nd6_rtr.c,v 1.241 2003/12/20 08:45:28 jinmei Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -2424,9 +2424,9 @@ nd6_setdefaultiface(ifindex)
if (ifindex < 0 || if_indexlim <= ifindex)
return (EINVAL);
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
- if (!ifnet_byindex(ifindex))
+ if (ifindex != 0 && !ifnet_byindex(ifindex))
#else
- if (!ifindex2ifnet[ifindex])
+ if (ifindex != 0 && !ifindex2ifnet[ifindex])
#endif
return (EINVAL);
Please sign in to comment.
Something went wrong with that request. Please try again.