Use correct ifdef for ipv4 checksumming

This commit is contained in:
Nico Schottelius 2019-08-02 12:03:08 +02:00
parent f40abbad27
commit c8c911ffce
1 changed files with 1 additions and 2 deletions

View File

@ -29,7 +29,6 @@ action nat64_icmp6_generic()
action nat64_generic(ipv4_addr_t src, ipv4_addr_t dst) {
hdr.ipv4.setValid();
/* Stuff that might need to be fixed */
hdr.ipv4.version = (bit<4>)4;
hdr.ipv4.ihl = (bit<4>)5; // internet header length: 4*5 = 20
@ -50,7 +49,7 @@ action nat64_generic(ipv4_addr_t src, ipv4_addr_t dst) {
/* Stuff that should be fine */
hdr.ethernet.ethertype = TYPE_IPV4;
#ifdef USE_NICO_DELTA_CHECKSUM
#ifdef _SUME_SWITCH_P4_
delta_ipv4_from_v6_to_v4();
#else
meta.chk_ipv4 = 1; /* need to calculate the hdrchecksum */