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

tcprewrite: Handle loopback for linux cooked capture files (Linux SLL) #204

Merged
merged 1 commit into from
Oct 26, 2015

Conversation

corentin-p1
Copy link
Contributor

When capturing network packets with tcpdump using the "all" pseudo-interface, the resulting capture file is in linux cooked format (linux SLL). Furthermore, some packets might be coming from the loopback device depending on the activity of the machine. In such a case, when trying to use tcprewrite to replace the linux SLL header with an ethernet header, the program fails with the following error:

$ tcprewrite --dlt=enet --enet-dmac=aa:bb:cc:00:00:00 --enet-smac=dd:ee:ff:00:00:00 -i cooked.pcap -o ether.pcap

Fatal Error in tcpedit.c:tcpedit_packet() line 114:
 From ./plugins/dlt_linuxsll/linuxsll.c:dlt_linuxsll_decode() line 201:
DLT_LINUX_SLL pcap's must contain only ethernet packets

This pull request address this issue.

@fklassen
Copy link
Member

Thanks for contributing 👍

fklassen added a commit that referenced this pull request Oct 26, 2015
tcprewrite: Handle loopback for linux cooked capture files (Linux SLL)
@fklassen fklassen merged commit 5285dee into appneta:master Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants