diff options
| author | Julian Elischer <julian@FreeBSD.org> | 1998-05-28 06:17:57 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 1998-05-28 06:17:57 +0000 |
| commit | 344d0370683d622903f3e44fd95ac973f13f7e39 (patch) | |
| tree | 5baab114828dea7a21b43825393733f7cef1dfdd /sys/netinet | |
| parent | b37764d74955e72eeb1e4cc7fc689c16e5e3f691 (diff) | |
Notes
Diffstat (limited to 'sys/netinet')
| -rw-r--r-- | sys/netinet/ip_divert.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 7725f543aa7b..41e5e008b392 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ip_divert.c,v 1.1.2.4 1997/09/30 16:25:06 davidg Exp $ + * $Id: ip_divert.c,v 1.1.2.5 1997/12/18 09:42:39 davidg Exp $ */ #include <sys/param.h> @@ -219,7 +219,11 @@ div_output(so, m, addr, control) sin = mtod(addr, struct sockaddr_in *); /* Loopback avoidance option */ - ip_divert_ignore = ntohs(inp->inp_lport); + if (sin) { + ip_divert_ignore = ntohs(sin->sin_port); + } else { + ip_divert_ignore = 0; + } /* Reinject packet into the system as incoming or outgoing */ if (!sin || sin->sin_addr.s_addr == 0) { |
