Skip to content

Commit

Permalink
bpf: nat: improve drop reason in snat_v6_rev_nat()
Browse files Browse the repository at this point in the history
When we don't recognize the inner L4 protocol type of an ICMPV6_PKT_TOOBIG
packet, return the appropriate drop reason.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
  • Loading branch information
julianwiedmann committed Mar 29, 2023
1 parent 83683fe commit c3907b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bpf/lib/nat.h
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ snat_v6_rev_nat(struct __ctx_buff *ctx, const struct ipv6_nat_target *target)
tuple.dport = identifier;
break;
default:
return DROP_INVALID;
return DROP_UNKNOWN_L4;
}
state = snat_v6_lookup(&tuple);
if (!state)
Expand Down

0 comments on commit c3907b9

Please sign in to comment.