aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/nat_cmd.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-10-30 18:02:01 +0000
committerBrian Somers <brian@FreeBSD.org>2000-10-30 18:02:01 +0000
commitcf881f54caae625e1ba9366a21c7aa217fe9a2c3 (patch)
tree685bdfcf4b8dbb4946ea75bc5893aca352a4ff19 /usr.sbin/ppp/nat_cmd.c
parent642cd09fb37a5ba249c70a35f074c1e495914f38 (diff)
downloadsrc-cf881f54caae625e1ba9366a21c7aa217fe9a2c3.tar.gz
src-cf881f54caae625e1ba9366a21c7aa217fe9a2c3.zip
Drop PKT_ALIAS_IGNORED packets if ``nat deny_incoming yes'' is in effect.
Approved by: rwatson, ru
Notes
Notes: svn path=/head/; revision=67987
Diffstat (limited to 'usr.sbin/ppp/nat_cmd.c')
-rw-r--r--usr.sbin/ppp/nat_cmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ppp/nat_cmd.c b/usr.sbin/ppp/nat_cmd.c
index f5ff49e44b77..588ceabab4f4 100644
--- a/usr.sbin/ppp/nat_cmd.c
+++ b/usr.sbin/ppp/nat_cmd.c
@@ -421,7 +421,11 @@ nat_LayerPull(struct bundle *bundle, struct link *l, struct mbuf *bp,
break;
case PKT_ALIAS_IGNORED:
- if (log_IsKept(LogTCPIP)) {
+ if (PacketAliasSetMode(0, 0) & PKT_ALIAS_DENY_INCOMING) {
+ log_Printf(LogTCPIP, "NAT engine denied data:\n");
+ m_freem(bp);
+ bp = NULL;
+ } else if (log_IsKept(LogTCPIP)) {
log_Printf(LogTCPIP, "NAT engine ignored data:\n");
PacketCheck(bundle, MBUF_CTOP(bp), bp->m_len, NULL, NULL, NULL);
}