Apply rustfmt fixes
This commit is contained in:
parent
0d627d430b
commit
079416b3eb
@ -5,5 +5,5 @@
|
||||
#![allow(clippy::missing_panics_doc)]
|
||||
#![allow(clippy::doc_markdown)]
|
||||
|
||||
pub mod protocols;
|
||||
pub mod error;
|
||||
pub mod protocols;
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
use super::{
|
||||
icmp::{translate_icmp_to_icmpv6, translate_icmpv6_to_icmp},
|
||||
tcp::{recalculate_tcp_checksum_ipv4, recalculate_tcp_checksum_ipv6}, udp::{recalculate_udp_checksum_ipv6, recalculate_udp_checksum_ipv4},
|
||||
tcp::{recalculate_tcp_checksum_ipv4, recalculate_tcp_checksum_ipv6},
|
||||
udp::{recalculate_udp_checksum_ipv4, recalculate_udp_checksum_ipv6},
|
||||
};
|
||||
use crate::error::{Error, Result};
|
||||
use pnet::packet::{
|
||||
@ -127,7 +128,11 @@ pub fn translate_ipv6_to_ipv4(
|
||||
});
|
||||
ipv4_packet.set_source(new_source);
|
||||
ipv4_packet.set_destination(new_destination);
|
||||
ipv4_packet.set_total_length((Ipv4Packet::minimum_packet_size() + new_payload.len()).try_into().unwrap());
|
||||
ipv4_packet.set_total_length(
|
||||
(Ipv4Packet::minimum_packet_size() + new_payload.len())
|
||||
.try_into()
|
||||
.unwrap(),
|
||||
);
|
||||
|
||||
// Copy the payload to the buffer
|
||||
ipv4_packet.set_payload(&new_payload);
|
||||
|
@ -1,4 +1,4 @@
|
||||
pub mod icmp;
|
||||
pub mod ip;
|
||||
pub mod tcp;
|
||||
pub mod udp;
|
||||
pub mod icmp;
|
@ -5,8 +5,8 @@
|
||||
#![allow(clippy::missing_panics_doc)]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
|
||||
pub mod link;
|
||||
pub mod ip;
|
||||
pub mod link;
|
||||
pub mod route;
|
||||
|
||||
/// Get a handle on a new rtnetlink connection
|
||||
|
@ -1,5 +1,5 @@
|
||||
//! Common code used across all protomask binaries
|
||||
|
||||
pub mod logging;
|
||||
pub mod rfc6052;
|
||||
pub mod packet_handler;
|
||||
pub mod rfc6052;
|
||||
|
@ -1,5 +1,2 @@
|
||||
|
||||
#[tokio::main]
|
||||
pub async fn main(){
|
||||
|
||||
}
|
||||
pub async fn main() {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user