aboutsummaryrefslogtreecommitdiff
path: root/libssh/packet.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-11-16 22:53:22 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2009-11-16 22:53:22 +0100
commit70b947544958eb982984b4d37d584037d1801c6f (patch)
tree9efb5e88504867d20eb09fccda18898ddf930317 /libssh/packet.c
parent02aecc1278d52fa1c2266e0a16fd3551e922f560 (diff)
downloadlibssh-70b947544958eb982984b4d37d584037d1801c6f.tar.gz
libssh-70b947544958eb982984b4d37d584037d1801c6f.tar.xz
libssh-70b947544958eb982984b4d37d584037d1801c6f.zip
Pcap: Fix bug with non-encrypted incoming packets
Diffstat (limited to 'libssh/packet.c')
-rw-r--r--libssh/packet.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libssh/packet.c b/libssh/packet.c
index 717b30fd..84c6466a 100644
--- a/libssh/packet.c
+++ b/libssh/packet.c
@@ -175,6 +175,17 @@ static int packet_read2(ssh_session session) {
goto error;
}
}
+#ifdef WITH_PCAP
+ else {
+ /* No crypto */
+ if(session->pcap_ctx){
+ ssh_pcap_context_write(session->pcap_ctx,
+ SSH_PCAP_DIR_IN, buffer_get(session->in_buffer),
+ buffer_get_len(session->in_buffer),
+ buffer_get_len(session->in_buffer));
+ }
+ }
+#endif
buffer_pass_bytes(session->in_buffer, sizeof(uint32_t));