Bug 204248

Summary: PF Does not work nat in FreeBSD 10.2
Product: Base System Reporter: ilya kulikov <kulikov51>
Component: kernAssignee: freebsd-pf (Nobody) <pf>
Status: Closed FIXED    
Severity: Affects Only Me CC: kp
Priority: ---    
Version: 10.2-STABLE   
Hardware: i386   
OS: Any   

Comment 1 Kristof Provost freebsd_committer freebsd_triage 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 freebsd_triage 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 8.8.8.8 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 freebsd_triage 2016-07-08 15:10:02 UTC
Closed, as indicated in the latest comments.