diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2008-05-09 02:44:56 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2008-05-09 02:44:56 +0000 |
commit | 6b5278216d3e945e7764e8fb4d6084731d9c1d42 (patch) | |
tree | e16579e8549035c8a3ce6525cf6278091980d103 /sys/netinet/ip_input.c | |
parent | bf10d8a20a778604168423fc81c27ee72bc63285 (diff) |
divert packets to local socket without modifying the ip header;
makes transparent proxies much easier; ok beck@, feedback claudio@
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 05b65ae94ef..93007462da2 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.158 2008/04/24 11:36:38 dlg Exp $ */ +/* $OpenBSD: ip_input.c,v 1.159 2008/05/09 02:44:54 markus Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -389,6 +389,9 @@ ipv4_input(m) (ia->ia_ifp->if_flags & IFF_UP)) goto ours; + if (m->m_pkthdr.pf.flags & PF_TAG_DIVERTED) + goto ours; + if (IN_MULTICAST(ip->ip_dst.s_addr)) { struct in_multi *inm; #ifdef MROUTING |