Use correct ifdef for ipv4 checksumming
This commit is contained in:
parent
f40abbad27
commit
c8c911ffce
1 changed files with 1 additions and 2 deletions
|
@ -29,7 +29,6 @@ action nat64_icmp6_generic()
|
||||||
action nat64_generic(ipv4_addr_t src, ipv4_addr_t dst) {
|
action nat64_generic(ipv4_addr_t src, ipv4_addr_t dst) {
|
||||||
hdr.ipv4.setValid();
|
hdr.ipv4.setValid();
|
||||||
|
|
||||||
|
|
||||||
/* Stuff that might need to be fixed */
|
/* Stuff that might need to be fixed */
|
||||||
hdr.ipv4.version = (bit<4>)4;
|
hdr.ipv4.version = (bit<4>)4;
|
||||||
hdr.ipv4.ihl = (bit<4>)5; // internet header length: 4*5 = 20
|
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 */
|
/* Stuff that should be fine */
|
||||||
hdr.ethernet.ethertype = TYPE_IPV4;
|
hdr.ethernet.ethertype = TYPE_IPV4;
|
||||||
|
|
||||||
#ifdef USE_NICO_DELTA_CHECKSUM
|
#ifdef _SUME_SWITCH_P4_
|
||||||
delta_ipv4_from_v6_to_v4();
|
delta_ipv4_from_v6_to_v4();
|
||||||
#else
|
#else
|
||||||
meta.chk_ipv4 = 1; /* need to calculate the hdrchecksum */
|
meta.chk_ipv4 = 1; /* need to calculate the hdrchecksum */
|
||||||
|
|
Loading…
Reference in a new issue