repair cut-and-paste bug. from: francis dupont. sync with kame

This commit is contained in:
itojun 2000-09-20 23:35:51 +00:00
parent d2c6420404
commit cb4931c8e7
1 changed files with 6 additions and 5 deletions

View File

@ -1,9 +1,10 @@
/* $NetBSD: route6.c,v 1.6 2000/02/06 12:49:49 itojun Exp $ */
/* $NetBSD: route6.c,v 1.7 2000/09/20 23:35:51 itojun Exp $ */
/* $KAME: route6.c,v 1.21 2000/09/20 23:00:49 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -15,7 +16,7 @@
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -157,7 +158,7 @@ ip6_rthdr0(m, ip6, rh0)
if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) ||
IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst) ||
IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst) ||
IN6_IS_ADDR_V4COMPAT(nextaddr)) {
IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) {
ip6stat.ip6s_badoptions++;
m_freem(m);
return(-1);
@ -182,6 +183,6 @@ ip6_rthdr0(m, ip6, rh0)
#else
ip6_forward(m, 1);
#endif
return(-1); /* m would be freed in ip6_forward() */
}