summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 3d2c6d2..8a128eb 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -157,6 +157,9 @@ raw_append(struct inpcb *last, struct ip *ip, struct mbuf *n)
if (!policyfail && mac_check_inpcb_deliver(last, n) != 0)
policyfail = 1;
#endif
+ /* Check the minimum TTL for socket. */
+ if (last->inp_ip_minttl && last->inp_ip_minttl > ip->ip_ttl)
+ policyfail = 1;
if (!policyfail) {
struct mbuf *opts = NULL;
struct socket *so;
OpenPOWER on IntegriCloud