diff options
| author | luwenpeng <[email protected]> | 2023-11-07 17:56:39 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2023-11-07 17:57:52 +0800 |
| commit | 2b00650d3e3d25cdd2bd704caa94112e40ff5923 (patch) | |
| tree | a890fff8312e2e3ba1187292913f3bd2c7358da0 /common/src/packet_construct.cpp | |
| parent | cc1a6f7a8742647dd405dc5df5d055c16fa10f67 (diff) | |
TCP handshake for decrypted traffic disables IP fragmentationv4.8.41-20231108
Diffstat (limited to 'common/src/packet_construct.cpp')
| -rw-r--r-- | common/src/packet_construct.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/src/packet_construct.cpp b/common/src/packet_construct.cpp index 6e17fa9..88f6070 100644 --- a/common/src/packet_construct.cpp +++ b/common/src/packet_construct.cpp @@ -218,7 +218,7 @@ int ipv4_header_construct(char *buffer, uint16_t carry_layer_len, struct in_addr ip_hdr->tos = tos; ip_hdr->tot_len = htons(sizeof(struct iphdr) + carry_layer_len); ip_hdr->id = htons(id); - ip_hdr->frag_off = 0; + ip_hdr->frag_off = htons(frag); ip_hdr->ttl = ttl; ip_hdr->protocol = protocol; ip_hdr->check = 0; @@ -334,7 +334,7 @@ int tcp_packet_v4_construct( // IPv4 Header u_char protocol = IPPROTO_TCP; - uint16_t frag = 0; + uint16_t frag = IP_DF; length += ipv4_header_construct(buffer + length, sizeof(struct tcphdr) + tcp_options_len + payload_len, src_addr, dst_addr, tos, id, frag, ttl, protocol); // TCP header and payload |
