Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/netinet Pull up rev. 1.16:



details:   https://anonhg.NetBSD.org/src/rev/419eee8567b7
branches:  netbsd-1-5
changeset: 488346:419eee8567b7
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 30 19:46:32 2000 +0000

description:
Pull up rev. 1.16:
Pass the correct destination address for the route-to-gateway case.
>From Zdenek Salvet, kern/10483.

diffstat:

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

diffs (33 lines):

diff -r ed4fe82ccc54 -r 419eee8567b7 sys/netinet/ip_flow.c
--- a/sys/netinet/ip_flow.c     Fri Jun 30 18:33:38 2000 +0000
+++ b/sys/netinet/ip_flow.c     Fri Jun 30 19:46:32 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_flow.c,v 1.14 1999/10/17 23:38:45 sommerfeld Exp $  */
+/*     $NetBSD: ip_flow.c,v 1.14.10.1 2000/06/30 19:46:32 thorpej 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