fix bug writing packets to ethernet rx buffer