summaryrefslogtreecommitdiff
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2006-01-13 10:11:24 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2006-01-13 10:11:24 +0000
commite6ddec33a963b34d8c4607890eb529a504e69637 (patch)
tree1f92fbd63cd04b5b51e33ba9aac8fce7b0761231 /sys/netinet/udp_usrreq.c
parentba9c588ad20180fd8f72932c01e0500604b3441e (diff)
Path MTU discovery for NAT-T.
OK markus@, "looks good" hshoexer@
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 46ff8c86d36..f92bc2cd69e 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.105 2005/10/17 08:43:34 henning Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.106 2006/01/13 10:11:23 mpf Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -899,13 +899,22 @@ udp_ctlinput(cmd, sa, v)
return NULL;
if (ip) {
uhp = (struct udphdr *)((caddr_t)ip + (ip->ip_hl << 2));
+
+#ifdef IPSEC
+ /* PMTU discovery for udpencap */
+ if (cmd == PRC_MSGSIZE && ip_mtudisc && udpencap_enable &&
+ udpencap_port && uhp->uh_sport == htons(udpencap_port)) {
+ udpencap_ctlinput(cmd, sa, v);
+ return (NULL);
+ }
+#endif
inp = in_pcbhashlookup(&udbtable,
ip->ip_dst, uhp->uh_dport, ip->ip_src, uhp->uh_sport);
if (inp && inp->inp_socket != NULL)
notify(inp, errno);
} else
in_pcbnotifyall(&udbtable, sa, errno, notify);
- return NULL;
+ return (NULL);
}
int