James Carlson writes: > Garrett D'Amore writes: > > Andrew Gallatin wrote: > > > Why don't you just fix the checksum by "subtracting" off the last 4 > > > bytes of the expanded vlan header (bytes 14..17 of the frame). > > > > > > > I had considered that, but done it mostly because I am not entirely sure > > that this is universally "safe". (This is due to ignorance on my part, > > and I'd love to be better informed.) > > > > There are two complexities in the checksum calculation that I'm > > concerned about. The first is the inclusion of carry bits. The second > > is the negation (~). I'm not entirely sure after these are done, that > > the operation is reversible enough to safely subtract those bytes. > > That shouldn't be an issue. It's just 1's complement math, not > something exotic like a Galios field.
Aha! You're obviously a cyborg! ;p > The hard part is knowing which bytes are overhead and need to be > removed. If the sender doesn't tell you, then you're probably sunk. That's the easy part. If you set the hardware to checksum bytes 0..13, and it is a vlan tagged frame, you just remove bytes 14..17 Drew _______________________________________________ networking-discuss mailing list [email protected]
