Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ethernet frame is 60 bytes length at least #133

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/switch/datapath/async_event_notifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ notify_packet_in( const uint8_t reason, const uint8_t table_id, const uint64_t c
if ( callbacks.packet_in == NULL ) {
return;
}

if ( packet->length < 60 ) { // fill up to ethernet(without FCS) minimum length
size_t length = packet->length;
append_back_buffer( packet, 60 - length );
memset( packet->data + length, 0, 60 - length );
}

if ( ERROR_DROP_PACKET == execute_meter( OFPM_CONTROLLER, packet ) ) {
return;
}
Expand Down