diff options
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 65e8698445f..3a42e2f72b0 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.180 2006/06/18 11:47:45 pascoe Exp $ */ +/* $OpenBSD: ip_output.c,v 1.181 2006/10/11 09:29:20 henning Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -1048,6 +1048,7 @@ ip_ctloutput(op, so, level, optname, mp) case IP_RECVRETOPTS: case IP_RECVDSTADDR: case IP_RECVIF: + case IP_RECVTTL: if (m == NULL || m->m_len != sizeof(int)) error = EINVAL; else { @@ -1061,6 +1062,7 @@ ip_ctloutput(op, so, level, optname, mp) case IP_TTL: inp->inp_ip.ip_ttl = optval; break; + #define OPTSET(bit) \ if (optval) \ inp->inp_flags |= bit; \ @@ -1081,6 +1083,9 @@ ip_ctloutput(op, so, level, optname, mp) case IP_RECVIF: OPTSET(INP_RECVIF); break; + case IP_RECVTTL: + OPTSET(INP_RECVTTL); + break; } } break; @@ -1383,6 +1388,7 @@ ip_ctloutput(op, so, level, optname, mp) case IP_RECVRETOPTS: case IP_RECVDSTADDR: case IP_RECVIF: + case IP_RECVTTL: *mp = m = m_get(M_WAIT, MT_SOOPTS); m->m_len = sizeof(int); switch (optname) { @@ -1411,6 +1417,9 @@ ip_ctloutput(op, so, level, optname, mp) case IP_RECVIF: optval = OPTBIT(INP_RECVIF); break; + case IP_RECVTTL: + optval = OPTBIT(INP_RECVTTL); + break; } *mtod(m, int *) = optval; break; |