Problem with using IPPROTO_RAW with source address filled in when zero

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

https://man7.org/linux/man-pages/man7/raw.7.html

  1. I am using IPPROTO_RAW to send my tcp packet
  2. I spefic 0.0.0.0 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

LEAVE A COMMENT