Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/netinet Pull up revision 1.16 (requested by thorpej):



details:   https://anonhg.NetBSD.org/src/rev/7bec07588825
branches:  netbsd-1-4
changeset: 470699:7bec07588825
user:      he <he%NetBSD.org@localhost>
date:      Sat Jul 01 17:42:48 2000 +0000

description:
Pull up revision 1.16 (requested by thorpej):
  Pass the correct destination address for the route-to-gateway
  case.  Fixes PR#10483.

diffstat:

 sys/netinet/ip_flow.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r f69a1f05b2ab -r 7bec07588825 sys/netinet/ip_flow.c
--- a/sys/netinet/ip_flow.c     Sat Jul 01 11:23:49 2000 +0000
+++ b/sys/netinet/ip_flow.c     Sat Jul 01 17:42:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_flow.c,v 1.13.2.1 1999/10/18 00:00:05 cgd Exp $     */
+/*     $NetBSD: ip_flow.c,v 1.13.2.2 2000/07/01 17:42:48 he Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -146,6 +146,7 @@
        struct ip *ip;
        struct ipflow *ipf;
        struct rtentry *rt;
+       struct sockaddr *dst;
        int error;
        int iplen;
 
@@ -226,8 +227,13 @@
         */
        ipf->ipf_uses++;
        PRT_SLOW_ARM(ipf->ipf_timer, IPFLOW_TIMER);
-       if ((error = (*rt->rt_ifp->if_output)(rt->rt_ifp, m,
-           &ipf->ipf_ro.ro_dst, rt)) != 0) {
+
+       if (rt->rt_flags & RTF_GATEWAY)
+               dst = rt->rt_gateway;
+       else
+               dst = &ipf->ipf_ro.ro_dst;
+
+       if ((error = (*rt->rt_ifp->if_output)(rt->rt_ifp, m, dst, rt)) != 0) {
                if (error == ENOBUFS)
                        ipf->ipf_dropped++;
                else



Home | Main Index | Thread Index | Old Index