You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[enhancement] Enable clear_cache() to spread upward in the packet tree #4707
Hm. Thanks for the suggestion. A bit unsure, but it feels like a pretty decent idea to me. I agree that the current behavior of caching can be hard to grasp.
Thinking about this, I feel like it could be achieved by just doing pkt.firstlayer().clear_cache(). Unsure there's a real use case, considering that building the parent layer already properly rebuilds everything if the child layer has been changed.
Activity
alxroyer-thales commentedon Mar 28, 2025
Provides a straight forward implementation for #4706.
Also improves performance in case of large packet trees with many packet fields (see #4705).
alxroyer-thales commentedon Mar 28, 2025
Successfully implemented in a Scapy wrapper.
I'll provide a PR soon to propose the integration of it directly in Scapy implementation.
gpotter2 commentedon Apr 6, 2025
Hm. Thanks for the suggestion. A bit unsure, but it feels like a pretty decent idea to me. I agree that the current behavior of caching can be hard to grasp.
@p-l- @guedou What do you think?
alxroyer-thales commentedon Apr 7, 2025
In order to ensure both 1) improve performance, and 2) avoid breaking the API, we could add parameters to
clear_cache()to provide both behaviours:PacketFields #4705, [bug] Force cache reset as soon as the payload or a packet field is modified #4706 concerns.Report scapy@2.4.5 optimizations in scapy@2.6.1 (secdev#4705, secdev#…
Restore default `clear_cache()` behaviour (secdev#4707)
Improve 'auto_clear_cache.uts' (secdev#4706, secdev#4707)
Report scapy@2.4.5 optimizations in scapy@2.6.1 (secdev#4705, secdev#…
Restore default `clear_cache()` behaviour (secdev#4707)
Fix parent not set when building default packet fields (secdev#4706, s…
gpotter2 commentedon May 29, 2025
Thinking about this, I feel like it could be achieved by just doing
pkt.firstlayer().clear_cache(). Unsure there's a real use case, considering that building the parent layer already properly rebuilds everything if the child layer has been changed.Fix Thales copyrights (secdev#4705, secdev#4706, secdev#4707)
Fix Thales copyrights (secdev#4705, secdev#4706, secdev#4707)
Fix `NoPayload.clear_cache()` signature (secdev#4707)