From fc400ed3c2ccb9f1e55f5d2bee80a73069f87d41 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 6 Feb 2018 17:16:19 +0800 Subject: [PATCH] Fix BPF filter not working for IOL. --- src/hypervisor_iol_bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hypervisor_iol_bridge.c b/src/hypervisor_iol_bridge.c index 1c8854a..9917606 100644 --- a/src/hypervisor_iol_bridge.c +++ b/src/hypervisor_iol_bridge.c @@ -98,7 +98,7 @@ void *iol_nio_listener(void *data) packet_filter_t *filter = iol_nio->packet_filters; packet_filter_t *next; while (filter != NULL) { - if (filter->handler(pkt, bytes_received, filter->data) == FILTER_ACTION_DROP) { + if (filter->handler(&pkt[IOL_HDR_SIZE], bytes_received, filter->data) == FILTER_ACTION_DROP) { if (debug_level > 0) printf("Packet dropped by packet filter '%s' from destination NIO on IOL bridge '%s'\n", filter->name, bridge->name); drop_packet = TRUE; @@ -180,7 +180,7 @@ void *iol_bridge_listener(void *data) packet_filter_t *filter = bridge->port_table[port].packet_filters; packet_filter_t *next; while (filter != NULL) { - if (filter->handler(pkt, bytes_received, filter->data) == FILTER_ACTION_DROP) { + if (filter->handler(&pkt[IOL_HDR_SIZE], bytes_received, filter->data) == FILTER_ACTION_DROP) { if (debug_level > 0) printf("Packet dropped by packet filter '%s' from IOL instance on IOL bridge '%s'\n", filter->name, bridge->name); drop_packet = TRUE;