mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Improve packet filter validation: use tcpdump, handle multi-line BPF, safe project load
Changes: - Replace tshark BPF validation with tcpdump -d (calls pcap_compile internally like ubridge, returns instantly without waiting for traffic) - Support multi-line BPF expressions: split on newlines and validate each line individually - Always validate, never save invalid filters on error - Drop invalid filters during project load with warning (prevents old topologies with bad filters from failing to open) - Simplify test cases (no longer depend on tshark availability)
This commit is contained in:
4 files changed
+58
-57
No files matched your search
@@ -583,7 +583,7 @@ class Link:
|
||||
"suspend": self._suspended,
|
||||
"show_filters_icon": getattr(self, '_show_filters_icon', True),
|
||||
}
|
||||
return {
|
||||
result = {
|
||||
"nodes": res,
|
||||
"link_id": self._id,
|
||||
"project_id": self._project.id,
|
||||
@@ -598,3 +598,4 @@ class Link:
|
||||
"wireshark": self._wireshark,
|
||||
"show_filters_icon": getattr(self, '_show_filters_icon', True),
|
||||
}
|
||||
return result
|
||||
Reference in new issue
Block a user