Problem with using IPPROTO_RAW with source address filled in when zero

  Kiến thức lập trình

  1. I am using IPPROTO_RAW to send my tcp packet
  2. I spefic to source address, so linux kernel will auto fill, and ip checksum auto filled in.
  3. I can’t calc correct tcp checksum because i don’t know what kernel fill in source address
  4. tcpdump always show cksum is incorrect, and i see the sourse address is filled by kernel good.

Maybe is there a way tell kernel auto calc the tcp checksum?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website