svn commit: r265691 - head/sys/netinet

Gleb Smirnoff glebius at
Thu May 8 20:54:21 UTC 2014

On Thu, May 08, 2014 at 10:50:28PM +0200, Michael Tuexen wrote:
M> > If "this should not happen" really means that we do not expect this issue
M> > at all, assuming we are coding correctly, then all these comments and printfs
M> > should be converted to KASSERTs.
M> I tried to keep the style of the code...
M> However, if the first one occurs, we are setting up a packet and have it too
M> short to contain the checksum. This would really be bug in our code... So a KASSERT is fine.
M> A KASSERT for the second case is also fine.
M> The only difference between the above and the KASSERT version is that
M> in case of problems the above just sends packets with wrong checksums
M> and the KASSERT version will panic (when compiled with INVARIANTS) or
M> panic (in case of m == NULL) or corrupt a byte. However, I also prefer
M> the KASSERT version, it will help to get the code right...
M> So I committed a change in
M> Thanks for your suggestion!

Thanks a lot, Michael!

Totus tuus, Glebius.

More information about the svn-src-head mailing list