Handle overlong frames like runt frames

This commit is contained in:
Juhani Krekelä 2019-07-04 12:28:56 +03:00
parent 8baa39bb8d
commit b5623511c6
1 changed files with 8 additions and 0 deletions

View File

@ -82,6 +82,14 @@ int main(int argc, char **argv) {
continue;
}
if (frame_length > 1522) {
errno = 0;
if (printf("Overlong frame (%zdB)\n", frame_length) == -1) {
err(1, "printf");
}
continue;
}
// Extract the MACs
// 012345 012345
// dest source