Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unable to send big UDP packets when SNAT rules are configured for nat46 #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions nat46/modules/nat46-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,17 @@ int nat46_ipv4_input(struct sk_buff *old_skb) {

nat46debug(5, "about to send v6 packet, flags: %02x", IP6CB(new_skb)->flags);
nat46_netdev_count_xmit(new_skb, old_skb->dev);

/*
* Although the protocol stipulates that the intermediate routers prohibit
* fragmentation of IPv6 packets, we have done the translation from IPv4
* to IPv6 here. The IPv6 packets are created by nat46, so the nat46 can be
* regarded as the sender. If fragmentation is needed, let the network
* protocol stack does it.
*/
if(0 == (ntohs(hdr4->frag_off) & 0x4000)) {
new_skb->local_df = 1;
}
netif_rx(new_skb);

done:
Expand Down