summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8455c24)
raw | patch | inline | side by side (parent: 8455c24)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 24 Jan 2009 10:00:30 +0000 (11:00 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 24 Jan 2009 10:03:28 +0000 (11:03 +0100) |
The port numbers were assumed to be in the host's byte order, when in
fact they are in network byte order (big endian). The patch adds `ntohs'
where necessary to fix this problem.
Resolves: #35
fact they are in network byte order (big endian). The patch adds `ntohs'
where necessary to fix this problem.
Resolves: #35
src/tcpconns.c | patch | blob | history |
diff --git a/src/tcpconns.c b/src/tcpconns.c
index 2e1159229da7c3d67b32a18133839e9aea019be2..ff663b80187573f29ee63b14325fd00540cb4b14 100644 (file)
--- a/src/tcpconns.c
+++ b/src/tcpconns.c
&& ((inp->inp_vflag & INP_IPV6) == 0))
continue;
- conn_handle_ports (inp->inp_lport, inp->inp_fport, tp->t_state);
+ conn_handle_ports (ntohs (inp->inp_lport), ntohs (inp->inp_fport),
+ tp->t_state);
} /* for (in_ptr) */
in_orig = NULL;