Repository navigation
Closed
Description
If I create a new user rule with a bunch of IPs separated by semi-columns, and the total length exceeds 255 characters, they will be truncated. I suppose the problem is here:
Lines 5001 to 5016 in c2c8fb1
| for (UINT i = 0; i < 255; i++) | |
| { | |
| WCHAR addressLocalString[256]; | |
| WCHAR addressRemoteString[256]; | |
| _r_str_printf (addressLocalString, RTL_NUMBER_OF (addressLocalString), LM_AD2, i + 1); | |
| _r_str_printf (addressRemoteString, RTL_NUMBER_OF (addressRemoteString), RM_AD2, i + 1); | |
| RtlIpv4StringToAddress (addressLocalString, TRUE, &terminator, &ipv4_local); | |
| RtlIpv4StringToAddress (addressRemoteString, TRUE, &terminator, &ipv4_remote); | |
| UINT32 remote_addr = _r_byteswap_ulong (ipv4_remote.S_un.S_addr); | |
| UINT32 local_addr = _r_byteswap_ulong (ipv4_local.S_un.S_addr); | |
| _wfp_logcallback (flags, &ft, (UINT8*)_r_obj_getstring (ntPath), NULL, (SID*)config.pbuiltin_admins_sid, IPPROTO_TCP, FWP_IP_VERSION_V4, remote_addr, NULL, RP_AD, local_addr, NULL, LP_AD, layer_id, filter_id, FWP_DIRECTION_OUTBOUND, FALSE, FALSE); | |
| } |
While I could split the rule into multiple rules, this is a pretty unexpected limitation, and it will definitely bite other people as well. Please consider allowing any length of data.
Reacted by amymor and duttyend
Metadata
Metadata
Assignees
Labels
No labels
Activity
dbmaxpayne commentedon Sep 19, 2021
Came across this as well. Thanks for researching the root cause.
Would be great if this limit was actually removed or at least a popup / text box came up when you hit the limit.
I find it weird that you simply can't continue typing in the rule editor window.
Nevertheless: Great software. Thanks a bunch :)
increase rules limit to 1024 symbols (issue #809)