nfs: fix clippy errors

pull/16236/head
Giuseppe Longo 1 month ago committed by Victor Julien
parent 4f41bbbbe6
commit a5ec4419e3

@ -1349,7 +1349,7 @@ impl NFSState {
}
/// Reject a partial v4 WRITE compound whose claimed length exceeds the
/// limit: log the tx and skip the record so the data blob is never buffered.
fn process_partial_v4_write_request_record<'b>(&mut self, r: &RpcPacket<'b>) {
fn process_partial_v4_write_request_record(&mut self, r: &RpcPacket<'_>) {
SCLogDebug!(
"REQUEST {} partial v4 WRITE rejected: claim exceeds {}",
r.hdr.xid,
@ -1395,7 +1395,7 @@ impl NFSState {
/// Mark a partially buffered v4 COMPOUND request record malformed and skip it
/// so the (attacker-controlled) record length is never buffered: the scanner's
/// structural errors are definitive and the full parser rejects the same record.
fn process_partial_v4_malformed_request_record<'b>(&mut self, r: &RpcPacket<'b>) {
fn process_partial_v4_malformed_request_record(&mut self, r: &RpcPacket<'_>) {
SCLogDebug!(
"REQUEST {} partial v4 COMPOUND rejected: structural scan error",
r.hdr.xid
@ -1433,7 +1433,7 @@ impl NFSState {
/// Mark a partially buffered v4 COMPOUND reply record malformed and skip it
/// (bounded fallback; cf. process_partial_v4_malformed_request_record).
fn process_partial_v4_malformed_response_record<'b>(&mut self, r: &RpcReplyPacket<'b>) {
fn process_partial_v4_malformed_response_record(&mut self, r: &RpcReplyPacket<'_>) {
SCLogDebug!(
"REPLY {} partial v4 COMPOUND rejected: structural scan error",
r.hdr.xid

@ -134,9 +134,9 @@ pub enum GssCompoundScan<'a> {
/// `gss_proc`/`gss_service` carry the request's RPCSEC_GSS credential combination
/// (header on the request side, xidmap on the response). Only the (0, 2) combination
/// the full record path unwraps is unwrapped here, so both always see the same compound.
pub fn gss_compound_scan_data<'a>(
gss_proc: u32, gss_service: u32, prog_data: &'a [u8],
) -> GssCompoundScan<'a> {
pub fn gss_compound_scan_data(
gss_proc: u32, gss_service: u32, prog_data: &[u8],
) -> GssCompoundScan<'_> {
if gss_proc == 0 && gss_service == 2 {
match parse_rpc_gssapi_integrity(prog_data) {
Ok((_rem, ref rec)) => GssCompoundScan::Compound(rec.data),

Loading…
Cancel
Save