From 9fbc0c5f1bab4e0fd754ca94c61a95699e49afc1 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Tue, 11 Jan 2022 00:25:19 -0600 Subject: [PATCH] netlink-request: print out packet that was oversized for debugging --- netlink-request/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netlink-request/src/lib.rs b/netlink-request/src/lib.rs index 198c456..91d245e 100644 --- a/netlink-request/src/lib.rs +++ b/netlink-request/src/lib.rs @@ -87,9 +87,10 @@ mod linux { return Err(io::Error::new( io::ErrorKind::InvalidInput, format!( - "Serialized netlink packet ({} bytes) larger than maximum size {}", + "Serialized netlink packet ({} bytes) larger than maximum size {}: {:?}", req.buffer_len(), - MAX_NETLINK_BUFFER_LENGTH + MAX_NETLINK_BUFFER_LENGTH, + req ), )); }