diff --git a/src/driver/common/fortconf.c b/src/driver/common/fortconf.c index 1a277f47..b59be398 100644 --- a/src/driver/common/fortconf.c +++ b/src/driver/common/fortconf.c @@ -329,9 +329,16 @@ FORT_API BOOL fort_conf_app_blocked( { const BOOL app_found = (app_flags.v != 0); - if (app_found && !app_flags.use_group_perm) { - *block_reason = FORT_BLOCK_REASON_PROGRAM; - return app_flags.blocked; + if (app_found) { + if (app_flags.lan_only) { + *block_reason = FORT_BLOCK_REASON_LAN_ONLY; + return TRUE; + } + + if (!app_flags.use_group_perm) { + *block_reason = FORT_BLOCK_REASON_PROGRAM; + return app_flags.blocked; + } } const UINT32 app_perm_val = app_flags.blocked ? 2 : 1; diff --git a/src/driver/common/fortdef.h b/src/driver/common/fortdef.h index 6c8a98f7..842ab11f 100644 --- a/src/driver/common/fortdef.h +++ b/src/driver/common/fortdef.h @@ -15,6 +15,7 @@ enum FortBlockReason { FORT_BLOCK_REASON_NONE = -1, FORT_BLOCK_REASON_UNKNOWN = 0, FORT_BLOCK_REASON_IP_INET, + FORT_BLOCK_REASON_LAN_ONLY, FORT_BLOCK_REASON_REAUTH, FORT_BLOCK_REASON_PROGRAM, FORT_BLOCK_REASON_APP_GROUP_FOUND, diff --git a/src/ui/model/connlistmodel.cpp b/src/ui/model/connlistmodel.cpp index 17e8ce3b..981d412d 100644 --- a/src/ui/model/connlistmodel.cpp +++ b/src/ui/model/connlistmodel.cpp @@ -178,6 +178,8 @@ QString ConnListModel::blockReasonText(const ConnRow &connRow) switch (connRow.blockReason) { case FORT_BLOCK_REASON_IP_INET: return tr("Blocked Internet address"); + case FORT_BLOCK_REASON_LAN_ONLY: + return tr("Restrict access to LAN only"); case FORT_BLOCK_REASON_REAUTH: return tr("Old connection closed on startup"); case FORT_BLOCK_REASON_PROGRAM: @@ -195,8 +197,12 @@ QString ConnListModel::connIconPath(const ConnRow &connRow) { if (connRow.blocked) { switch (connRow.blockReason) { + case FORT_BLOCK_REASON_NONE: + return ":/icons/error.png"; case FORT_BLOCK_REASON_IP_INET: return ":/icons/ip.png"; + case FORT_BLOCK_REASON_LAN_ONLY: + return ":/icons/hostname.png"; case FORT_BLOCK_REASON_REAUTH: return ":/icons/arrow_refresh_small.png"; case FORT_BLOCK_REASON_PROGRAM: @@ -204,7 +210,6 @@ QString ConnListModel::connIconPath(const ConnRow &connRow) case FORT_BLOCK_REASON_APP_GROUP_FOUND: return ":/icons/application_double.png"; case FORT_BLOCK_REASON_FILTER_MODE: - default: return ":/icons/deny.png"; } }