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/ip_input.c,v retrieving revision 1.278.2.1 retrieving revision 1.278.2.2 diff -u -p -r1.278.2.1 -r1.278.2.2 --- src/sys/netinet/ip_input.c 2009/05/13 17:22:28 1.278.2.1 +++ src/sys/netinet/ip_input.c 2009/07/23 23:32:48 1.278.2.2 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.278.2.1 2009/05/13 17:22:28 jym Exp $ */ +/* $NetBSD: ip_input.c,v 1.278.2.2 2009/07/23 23:32:48 jym Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.278.2.1 2009/05/13 17:22:28 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.278.2.2 2009/07/23 23:32:48 jym Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -2057,9 +2057,9 @@ ip_savecontrol(struct inpcb *inp, struct struct mbuf *m) { - if (inp->inp_socket->so_options & SO_TIMESTAMP + if (inp->inp_socket->so_options & SO_TIMESTAMP #ifdef SO_OTIMESTAMP - || inp->inp_socket->so_options & SO_OTIMESTAMP + || inp->inp_socket->so_options & SO_OTIMESTAMP #endif ) { struct timeval tv; @@ -2118,6 +2118,12 @@ ip_savecontrol(struct inpcb *inp, struct if (*mp) mp = &(*mp)->m_next; } + if (inp->inp_flags & INP_RECVTTL) { + *mp = sbcreatecontrol((void *) &ip->ip_ttl, + sizeof(uint8_t), IP_RECVTTL, IPPROTO_IP); + if (*mp) + mp = &(*mp)->m_next; + } } /* @@ -2201,7 +2207,7 @@ sysctl_net_inet_ip_maxflows(SYSCTLFN_ARG static int sysctl_net_inet_ip_hashsize(SYSCTLFN_ARGS) -{ +{ int error, tmp; struct sysctlnode node; @@ -2229,7 +2235,7 @@ sysctl_net_inet_ip_hashsize(SYSCTLFN_ARG * EINVAL if not a power of 2 */ error = EINVAL; - } + } return error; }