aboutgitcodebugslistschat
path: root/tap.h
diff options
context:
space:
mode:
Diffstat (limited to 'tap.h')
-rw-r--r--tap.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/tap.h b/tap.h
index 8fe460a..40cf480 100644
--- a/tap.h
+++ b/tap.h
@@ -20,8 +20,10 @@ struct tap_hdr {
static inline size_t tap_hdr_len_(const struct ctx *c)
{
- (void)c;
- return sizeof(struct tap_hdr);
+ if (c->mode == MODE_PASST)
+ return sizeof(struct tap_hdr);
+ else
+ return sizeof(struct ethhdr);
}
/**