Skip to content

Commit

Permalink
Fix BPF filter not working for IOL.
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Feb 6, 2018
1 parent 2a54dda commit fc400ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hypervisor_iol_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fc400ed

Please sign in to comment.