diff options
author | mlaier <mlaier@FreeBSD.org> | 2005-08-23 14:13:17 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2005-08-23 14:13:17 +0000 |
commit | 20fd9e3a1fd2c7f3812ce9218db0d7b8d62134b5 (patch) | |
tree | ca41f6a7c980776aba9c27549c27c64728297022 | |
parent | 8cf3c8952235c756487d763a755ee223c358b12e (diff) | |
download | FreeBSD-src-20fd9e3a1fd2c7f3812ce9218db0d7b8d62134b5.zip FreeBSD-src-20fd9e3a1fd2c7f3812ce9218db0d7b8d62134b5.tar.gz |
Don't loop back packets that have been routed by pf. This fixes an endless
loop where the same packet is sent over and over again.
Obtained from: OpenBSD
Reported by: Sergey Lapin
Tested by: Sergey Lapin
MFC after: 7 days
-rw-r--r-- | sys/net/if_ethersubr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index eada2f9..2b3f746 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -310,7 +310,8 @@ ether_output(struct ifnet *ifp, struct mbuf *m, * on the wire). However, we don't do that here for security * reasons and compatibility with the original behavior. */ - if ((ifp->if_flags & IFF_SIMPLEX) && (loop_copy != -1)) { + if ((ifp->if_flags & IFF_SIMPLEX) && (loop_copy != -1) && + m_tag_find(m, PACKET_TAG_PF_ROUTED, NULL) == NULL) { int csum_flags = 0; if (m->m_pkthdr.csum_flags & CSUM_IP) |