Project

General

Profile

Actions

Bug #1519

closed

sshlockout truncates ip

Added by Ermal Luçi almost 13 years ago. Updated almost 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Ermal Luçi
Category:
-
Target version:
Start date:
05/12/2011
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

Reproted here http://forum.pfsense.org/index.php/topic,36641.0.html.
There is a bug in sshlockout where the buffer used to held the ip truncates if the ip is in the longest form

[code]

diff --git a/pfPorts/sshlockout_pf/files/sshlockout_pf.c b/pfPorts/sshlockout_pf/files/sshlockout_pf.c
index f1f742a..194c6b9 100644
--- a/pfPorts/sshlockout_pf/files/sshlockout_pf.c
++ b/pfPorts/sshlockout_pf/files/sshlockout_pf.c
@ -115,7 +115,7 @ pf_tableentry(char *tablename, int n1, int n2, int n3, int n4)
struct pfioc_table io;
struct pfr_table table;
struct pfr_addr addr;
- char buf15 = { 0 };
char buf16 = { 0 };

bzero(&table, sizeof(table));
if (strlcpy(table.pfrt_name, tablename,
[/code]

This diff should fix it and i will commit it soon.

Actions #1

Updated by Ermal Luçi almost 13 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Applied in changeset commit:"08212a218dff0400190dc052c5e73c9ed2fbf18b".

Actions #2

Updated by Ermal Luçi almost 13 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF