diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2001-07-17 22:22:18 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2001-07-17 22:22:18 +0000 |
commit | e7979e30e8ae4854f6b6e26eee9c7c526d0e0a37 (patch) | |
tree | 1983c2869aa59493165fc5d4689b358a897f75b8 /sys/net/pf_norm.c | |
parent | 49ee2307a2fd26e9b44b815990e007ea64e7faa7 (diff) |
support min-ttl, okay dhartmei@
Diffstat (limited to 'sys/net/pf_norm.c')
-rw-r--r-- | sys/net/pf_norm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c index c67836e5bfa..b9759a0e9d9 100644 --- a/sys/net/pf_norm.c +++ b/sys/net/pf_norm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_norm.c,v 1.2 2001/07/17 21:54:26 provos Exp $ */ +/* $OpenBSD: pf_norm.c,v 1.3 2001/07/17 22:22:14 provos Exp $ */ /* * Copyright 2001 Niels Provos <provos@citi.umich.edu> @@ -516,6 +516,9 @@ pf_normalize_ip(struct mbuf **m0, int dir, struct ifnet *ifp, u_short *reason) else h->ip_off &= IP_DF; + /* Enforce a minimum ttl, may cause endless packet loops */ + if (r->min_ttl && h->ip_ttl < r->min_ttl) + h->ip_ttl = r->min_ttl; return (PF_PASS); |