View | Details | Raw Unified | Return to bug 145737
Collapse All | Expand All

(-)b/sys/netinet/udp_usrreq.c (+19 lines)
Lines 372-377 udp_input(struct mbuf *m, int off) Link Here
372
	else
372
	else
373
		memset(&save_ip, 0, sizeof(save_ip));
373
		memset(&save_ip, 0, sizeof(save_ip));
374
374
375
#ifdef IPSEC_NAT_T
376
	/* 
377
	 * RFC 3948
378
	 * 
379
	 * 3.1.2. Transport Mode Decapsulation NAT Procedure
380
	 * 
381
	 * Depending on local policy, one of the following MUST be done:
382
	 * 
383
	 * [...]
384
	 * 
385
	 * 3.  If the protocol header after the ESP header is a UDP header, set
386
	 *     the checksum field to zero in the UDP header. [...]
387
	 */
388
	
389
	if (m_tag_find(m, PACKET_TAG_IPSEC_NAT_T_PORTS, NULL) != NULL) {
390
		uh->uh_sum = 0;
391
	}
392
#endif
393
375
	/*
394
	/*
376
	 * Checksum extended UDP header and data.
395
	 * Checksum extended UDP header and data.
377
	 */
396
	 */

Return to bug 145737