-
Notifications
You must be signed in to change notification settings - Fork 7
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
New DNP3_Callbacks do not include handlers for rejected link or transport data #7
Comments
Adam Crain [email protected] writes:
You're right; I overlooked the link layer because I still have to For the transport layer, I take it you mean invalid segment series
I think it's better to do it in response to callbacks; it seems to give |
WRT to the transport function, I was thinking of reassembly buffer overflows in particular, but it would be good to be notified of any kind of invalid segment series like you say. If there are callbacks for any kind of protocol violation, I agree that we can remove the requirement that feed return an error code. |
Now that you mention it, buffer overflows might actually be one thing
where returning an error from feed is more appropriate, since the parser
could be stuck in the sense that it would be incorrect to ignore the
input (which was not necessarily invalid) but it can't process it.
|
5e2cf2b adds.
|
Unfortunately, the transport layer callbacks are not possible without either throwing out the way the transport function is implemented or making an extension to hammer that I had considered before to solve the thread-safety issue:
where the
Without a path to inject semantic data into the parse, the statically-defined semantic actions cannot find the callbacks / Dissector instance associated with the current parse. |
OK. The StreamProcessor is in full control of what gets written when the proxy is in it's normal operating mode. Let's keep this open just to track it, but there are probably a lot more valuable things to focus on in the remaining hours. I suspect the elfbac integration will be taking your time. |
It's another one of those issues that will benefit when we can synthesize our own output. (We will only produce sane segment series.) |
Looks like I partly spoke too soon! (Misread my own code.) I can add a callback to report whenever the transport layer discards frames, though it won't tell you why it did so. I'd also not guarantee that it won't call it for every frame individually.
Note that Cf. 02eb157. Is that enough to close the issue? |
"I'd also not guarantee that it won't call it for every frame individually." Can you clarify this? It is only called for invalid frames, correct? I don't care if it is invoked multiple times, so long as it only happens when invalid series is present. |
Yes, but it might be called for each invalid segment in a series, or any combination of them. Though I'm trying to have it called only once, I'd like to not make that a guarantee. |
That should have read "each segment in an invalid series", to be precise. |
I'm ok w/ that. |
Notifications for these types of "bad data" will be required to close the TCP session.
If the parser "feed" function returns an error for these that's a suitable alternative.
The text was updated successfully, but these errors were encountered: