summaryrefslogtreecommitdiff
path: root/common/src/packet_construct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/packet_construct.cpp')
-rw-r--r--common/src/packet_construct.cpp4
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