Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/udp_usrreq.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/udp_usrreq.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.177 retrieving revision 1.178 diff -u -p -r1.177 -r1.178 --- src/sys/netinet/udp_usrreq.c 2009/04/18 14:58:05 1.177 +++ src/sys/netinet/udp_usrreq.c 2009/07/19 23:17:33 1.178 @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.177 2009/04/18 14:58:05 tsutsui Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.178 2009/07/19 23:17:33 minskim Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.177 2009/04/18 14:58:05 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.178 2009/07/19 23:17:33 minskim Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -836,6 +836,12 @@ udp4_realinput(struct sockaddr_in *src, } #endif + /* + * Check the minimum TTL for socket. + */ + if (mtod(m, struct ip *)->ip_ttl < inp->inp_ip_minttl) + goto bad; + udp4_sendup(m, off, (struct sockaddr *)src, inp->inp_socket); rcvcnt++; }