Move rt_gwroute operation out of stripoutput

We should do it in ip_hresolv_needed.
This commit is contained in:
ozaki-r 2015-07-14 08:44:59 +00:00
parent cd4fff4016
commit f2abd6a2e3
2 changed files with 5 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_strip.c,v 1.99 2015/07/14 08:15:41 ozaki-r Exp $ */
/* $NetBSD: if_strip.c,v 1.100 2015/07/14 08:44:59 ozaki-r Exp $ */
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
/*
@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.99 2015/07/14 08:15:41 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.100 2015/07/14 08:44:59 ozaki-r Exp $");
#include "opt_inet.h"
@ -755,9 +755,6 @@ stripoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
#endif
switch (dst->sa_family) {
case AF_INET:
if (rt != NULL && rt->rt_gwroute != NULL)
rt = rt->rt_gwroute;
/* assume rt is never NULL */
if (rt == NULL || rt->rt_gateway->sa_family != AF_LINK ||
satocsdl(rt->rt_gateway)->sdl_alen != ifp->if_addrlen) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_output.c,v 1.242 2015/07/01 03:39:36 ozaki-r Exp $ */
/* $NetBSD: ip_output.c,v 1.243 2015/07/14 08:44:59 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.242 2015/07/01 03:39:36 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.243 2015/07/14 08:44:59 ozaki-r Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -167,6 +167,7 @@ ip_hresolv_needed(const struct ifnet * const ifp)
case IFT_HIPPI:
case IFT_IEEE1394:
case IFT_ISO88025:
case IFT_SLIP:
return true;
default:
return false;