update IPv4 utils
This commit is contained in:
@@ -4,8 +4,8 @@ static void overwrite_ipv4_saddr(struct packet *pkt, uint32_t saddr)
|
||||
{
|
||||
const struct layer_record *ipv4_layer = packet_get_innermost_layer(pkt, LAYER_TYPE_IPV4);
|
||||
EXPECT_TRUE(ipv4_layer);
|
||||
const struct ip *hdr = (const struct ip *)ipv4_layer->hdr_ptr;
|
||||
ipv4_hdr_set_host_order_saddr((struct ip *)hdr, saddr);
|
||||
struct ip *hdr = (struct ip *)ipv4_layer->hdr_ptr;
|
||||
ipv4_hdr_set_src_addr(hdr, saddr);
|
||||
}
|
||||
|
||||
#if 1
|
||||
|
||||
Reference in New Issue
Block a user