aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip_flow.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-08-08 08:20:35 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-08-08 08:20:35 +0000
commit0d8ec8d4df81e58799803b466dbee2e54470a7d1 (patch)
tree795413ff34a879dc58a196947a1e9698e9d02d96 /sys/netinet/ip_flow.c
parentb2f696ef0b7b637fc415f829211d619accad4bfa (diff)
Notes
Diffstat (limited to 'sys/netinet/ip_flow.c')
-rw-r--r--sys/netinet/ip_flow.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/ip_flow.c b/sys/netinet/ip_flow.c
index 6c9119b5ee86..a7af5450af90 100644
--- a/sys/netinet/ip_flow.c
+++ b/sys/netinet/ip_flow.c
@@ -109,6 +109,7 @@ ipflow_fastforward(
struct ip *ip;
struct ipflow *ipf;
struct rtentry *rt;
+ struct sockaddr *dst;
int error;
/*
@@ -158,7 +159,12 @@ ipflow_fastforward(
*/
ipf->ipf_uses++;
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