* Lawrence Teo <[email protected]> [2014-07-10 06:14]:
> This diff does the following for reinjected packets:
> 
> 1.  Zero the protocol checksum.

that should not be needed. at least afair.

> 2.  Set the checksum flag in pkthdr.
> 3a. For outbound packets, let the stack take care of the checksum.

i like.
might be biased :)

> 3b. For inbound packets, calculate the checksum immediately with
>     in_proto_cksum_out(m, NULL).
> 
> I'm not sure if it's all right to use in_proto_cksum_out() for inbound
> packets (its name ends with "_out" after all :)) but using it really
> helps to simplify things and avoid redundant code.

well, could argue it goes out to divert...

-- 
Henning Brauer, [email protected], [email protected]
BS Web Services GmbH, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS. Virtual & Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/

Reply via email to