wwqgtxx:sing-tun forwardICMP 改动存在阻塞风险
wwqgtxx 认为第二处提交的 forwardICMP 虽可能提升性能,但引入更大阻塞风险与重复加锁问题,整体不够稳健。原文见下方引用。
作者原文@wwqgtxxAs a side note, I don't think the changes in the second commit are entirely sound. The
forwardICMPsection, in particular, appears to boost performance but introduces greater risk. In reality, theICMPForwarderHandlershould return as quickly as possible and avoid any blocking or long-running operations internally; clearly,PrepareConnectionoffers no guarantee against blocking.Furthermore, I don't quite understand the addition of
s.icmpMuthere;DirectRouteMappingis already thread-safe, so what is the purpose of wrapping it in an external lock?





