diff options
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r-- | sys/netinet/ip_divert.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 947f5205b2e..6ac2f0688e2 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_divert.c,v 1.17 2014/03/27 13:27:28 mpi Exp $ */ +/* $OpenBSD: ip_divert.c,v 1.18 2014/03/28 08:33:51 sthen Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -180,8 +180,10 @@ divert_output(struct mbuf *m, ...) schednetisr(NETISR_IP); splx(s); } else { - error = ip_output(m, NULL, &inp->inp_route, - IP_ALLOWBROADCAST | IP_RAWOUTPUT, NULL, NULL); + error = ip_output(m, (void *)NULL, &inp->inp_route, + ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0) + | IP_ALLOWBROADCAST | IP_RAWOUTPUT, (void *)NULL, + (void *)NULL); if (error == EACCES) /* translate pf(4) error for userland */ error = EHOSTUNREACH; } |