bddff5
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c
bddff5
index 7b398cf..91fd9b8 100644
bddff5
--- a/wiretap/pcapng.c
bddff5
+++ b/wiretap/pcapng.c
bddff5
@@ -3230,6 +3230,10 @@ pcapng_write_enhanced_packet_block(wtap_dumper *wdh, const wtap_rec *rec,
bddff5
         have_options = TRUE;
bddff5
         options_total_length = options_total_length + 8;
bddff5
     }
bddff5
+    if (rec->presence_flags & WTAP_HAS_DROP_COUNT) {
bddff5
+        have_options = TRUE;
bddff5
+        options_total_length = options_total_length + 12;
bddff5
+    }
bddff5
     if (have_options) {
bddff5
         /* End-of options tag */
bddff5
         options_total_length += 4;
bddff5
@@ -3353,6 +3357,17 @@ pcapng_write_enhanced_packet_block(wtap_dumper *wdh, const wtap_rec *rec,
bddff5
         wdh->bytes_dumped += 4;
bddff5
         pcapng_debug("pcapng_write_enhanced_packet_block: Wrote Options packet flags: %x", rec->rec_header.packet_header.pack_flags);
bddff5
     }
bddff5
+    if (rec->presence_flags & WTAP_HAS_DROP_COUNT) {
bddff5
+        option_hdr.type         = OPT_EPB_DROPCOUNT;
bddff5
+        option_hdr.value_length = 8;
bddff5
+        if (!wtap_dump_file_write(wdh, &option_hdr, 4, err))
bddff5
+            return FALSE;
bddff5
+        wdh->bytes_dumped += 4;
bddff5
+        if (!wtap_dump_file_write(wdh, &rec->rec_header.packet_header.drop_count, 8, err))
bddff5
+            return FALSE;
bddff5
+        wdh->bytes_dumped += 8;
bddff5
+        pcapng_debug("pcapng_write_enhanced_packet_block: Wrote Options drop count: %" G_GINT64_MODIFIER "u", rec->rec_header.packet_header.drop_count);
bddff5
+    }
bddff5
     /* Write end of options if we have options */
bddff5
     if (have_options) {
bddff5
         if (!wtap_dump_file_write(wdh, &zero_pad, 4, err))