-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ftp: begin conversion process to Rust. #12523
base: master
Are you sure you want to change the base?
Conversation
As part of the effort to convert the FTP/FTPDATA parser to rust, move the enums from C to rust.
Issue: 4082 This command moves the FtpTransferCmd and FtpCommand to Rust. Due to the way commands are noted in the transactions, the logic in the sticky buffer ftp.command and the ftp json output functions was updated.
Issue: 4082 Move the configuration file handling to Rust. These changes will no longer terminate Suricata when there's an invalid value for ftp.memcap. Like earlier Suricata releases, an error message is logged "Invalid value <value> for ftp.memcap" but Suricata will no longer terminate execution. It will use a default value of "0" instead.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12523 +/- ##
==========================================
- Coverage 80.70% 80.69% -0.01%
==========================================
Files 925 926 +1
Lines 258914 258968 +54
==========================================
+ Hits 208949 208976 +27
- Misses 49965 49992 +27
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 24543 |
*memcap = v; | ||
SCLogConfig!("FTP memcap: {}", v); | ||
} else { | ||
SCLogError!("Invalid value {} for ftp.memcap", val); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these can we add a bit more info..
Invalid value {} for ftp.memcap, will use default of ??
And since nothing errors out, perhaps a warning instead?
Continuation of #12522
ftp: Partial conversion of the FTP protocol parser to Rust.
This PR represents partial completion of issue 4082.
Link to ticket: https://redmine.openinfosecfoundation.org/issues/4082
Describe changes:
Updates:
SCLogNotice
call on the output path withSCLogDebug
Behavioral change
Previous versions of Suricata terminated execution if
ftp.memcap
contained an invalid value. An error message was displayed before exiting. The changes in this PR continue to print the error message in this case; instead of terminating Suricata, Suricata will continue execution and use a value of0
forftp.memcap
. This is noted in the upgrade notes.Provide values to any of the below to override the defaults.
link to the pull request in the respective
_BRANCH
variable.SV_REPO=
SV_BRANCH=
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=