Skip to content

Commit 6da41ed

Browse files
tokio-quiche: ignore unrecognized cmsgs
Router currently processes a variety of cmsgs. It returns an EINVAL if it encounters a cmsg it doesn't care about. This means that we won't create an Incoming or send the packet to the corresponding IOW. Rather than black-holing packets with cmsgs we don't care about, we should just no-op.
1 parent a8cb62f commit 6da41ed

File tree

1 file changed

+3
-4
lines changed
  • tokio-quiche/src/quic/router

1 file changed

+3
-4
lines changed

tokio-quiche/src/quic/router/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,9 @@ where
527527
// messages because
528528
// we set IP_PKTINFO on the socket.
529529
},
530-
_ => {
531-
return Poll::Ready(
532-
Err(Errno::EINVAL.into()),
533-
);
530+
cmsg => {
531+
let repr = format!("{cmsg:?}");
532+
log::debug!("received unknown cmsg"; "cmsg"=>repr);
534533
},
535534
};
536535
}

0 commit comments

Comments
 (0)