diff options
Diffstat (limited to 'trafgen_l3.c')
-rw-r--r-- | trafgen_l3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/trafgen_l3.c b/trafgen_l3.c index 91052a0..e6aa516 100644 --- a/trafgen_l3.c +++ b/trafgen_l3.c @@ -50,7 +50,7 @@ static void ipv4_field_changed(struct proto_field *field) if (field->id == IP4_SADDR || field->id == IP4_DADDR) { struct proto_hdr *upper = proto_upper_header(field->hdr); - if (upper && upper->ops->id == PROTO_UDP) + if (upper && (upper->ops->id == PROTO_UDP || upper->ops->id == PROTO_TCP)) upper->is_csum_valid = false; } } @@ -148,7 +148,7 @@ static void ipv6_field_changed(struct proto_field *field) if (field->id == IP6_SADDR || field->id == IP6_DADDR) { struct proto_hdr *upper = proto_upper_header(field->hdr); - if (upper && upper->ops->id == PROTO_UDP) + if (upper && (upper->ops->id == PROTO_UDP || upper->ops->id == PROTO_TCP)) upper->is_csum_valid = false; } } |