Bug 204248 - PF Does not work nat in FreeBSD 10.2
Summary: PF Does not work nat in FreeBSD 10.2
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.2-STABLE
Hardware: i386 Any
: --- Affects Only Me
Assignee: freebsd-pf (Nobody)
Depends on:
Reported: 2015-11-03 09:02 UTC by ilya kulikov
Modified: 2016-07-08 15:10 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Kristof Provost freebsd_committer 2015-11-04 21:14:49 UTC
This might be bug #203630.

Can you test the patch from that PR and/or test with ipfw?
Comment 2 ilya kulikov 2015-11-06 09:54:15 UTC
Hi, I install new FreeBSD 10.2-RELEASE 
edited file /sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c

dell line

 			    packet->vlan_tci & 0xfff;
		if (0 == m_head->m_pkthdr.csum_flags) {
 			goto pre_send;

and add line 

                            packet->vlan_tci & 0xfff;

                /* Ignore flags for checksum already calculated or valid */
                if (0 == (m_head->m_pkthdr.csum_flags & 0xffffff)) {
                        goto pre_send;

Further rebuilt kernel with options PF, the situation has not changed, may be i wrong to apply the patch.
Comment 3 Kristof Provost freebsd_committer 2015-11-06 10:08:53 UTC
It looks like you did that right.

Can you attach network captures, made on the host machine on both hn0 and hn1 interfaces? I'd like to try to figure out what's happening (or not happening) to break the NAT.

This should do the trick:
tcpdump -n -i hn0 -s0 -w hn0.pcap &
tcpdump -n -i hn1 -s0 -w -hn1.pcap &

Then try to run a ping to on the windows 7 machine.
Comment 4 ilya kulikov 2015-11-06 11:14:48 UTC
Sorry I misunderstood created an internal virtual adapter (Use VLAN2), the problem is corrected. Your patch works. Thank you!
Comment 5 cmb 2015-12-12 03:02:03 UTC
this is a duplicate of PR #203630 and can be closed.
Comment 6 Kristof Provost freebsd_committer 2016-07-08 15:10:02 UTC
Closed, as indicated in the latest comments.