aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/eyesdn.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/eyesdn.c')
-rw-r--r--wiretap/eyesdn.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wiretap/eyesdn.c b/wiretap/eyesdn.c
index 8bd32c2249..399c02d5b2 100644
--- a/wiretap/eyesdn.c
+++ b/wiretap/eyesdn.c
@@ -313,6 +313,7 @@ read_eyesdn_rec(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err,
return FALSE;
}
+ phdr->rec_type = REC_TYPE_PACKET;
phdr->presence_flags = WTAP_HAS_TS;
phdr->ts.secs = secs;
phdr->ts.nsecs = usecs * 1000;
@@ -415,6 +416,12 @@ static gboolean eyesdn_dump(wtap_dumper *wdh,
int protocol;
int size;
+ /* We can only write packet records. */
+ if (phdr->rec_type != REC_TYPE_PACKET) {
+ *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+ return FALSE;
+ }
+
/* Don't write out anything bigger than we can read.
* (The length field in packet headers is 16 bits, which
* imposes a hard limit.) */