Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
Fix IPv6 handling
Browse files Browse the repository at this point in the history
Signed-off-by: Syrone Wong <[email protected]>
  • Loading branch information
wongsyrone committed May 10, 2022
1 parent 90834e1 commit 857f9ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nf_nat_fullcone.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,12 +1223,12 @@ static unsigned int nf_nat_handle_prerouting(u8 nfproto, struct sk_buff *skb, un
if (nfproto == NFPROTO_IPV4) {
newrange->min_addr.ip = mapping->int_addr;
newrange->max_addr.ip = mapping->int_addr;
newrange->min_proto.udp.port = cpu_to_be16(mapping->int_port);
} else if (nfproto == NFPROTO_IPV6) {
newrange->min_addr = mapping_6->int_addr;
newrange->max_addr = mapping_6->int_addr;
newrange->min_proto.udp.port = cpu_to_be16(mapping_6->int_port);
}

newrange->min_proto.udp.port = cpu_to_be16(mapping->int_port);
newrange->max_proto = newrange->min_proto;

if (nfproto == NFPROTO_IPV4) {
Expand Down

0 comments on commit 857f9ad

Please sign in to comment.