Project

General

Profile

Actions

Bug #4844

closed

Error loading rules for numeric host name in alias

Added by Phillip Davis almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
Rules / NAT
Target version:
Start date:
07/15/2015
Due date:
% Done:

100%

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

Description

Create a host-type alias. Put just a number in "IP or FQDN" - e.g. I made alias name "Zqw" and a single host "23". The webGUI reports:
There were error(s) loading the rules: /tmp/rules.debug:44: syntax error - The line in question reads [44]: table { 23 }
and /tmp/rules.debug has:
table <Zqw> { 23 }
Zqw = "<Zqw>"
which pf does not cope with.
It is possible to have a host name that is a number, and end up with a domain name like 23.mycompany.com - unfortunately some Wally allowed such things in standards many years ago, so it can be rather difficult to tell the difference between a number and a host name.

I had attempted to fix this with https://github.com/pfsense/pfsense/commit/81a73bcba3b3a79bb3a7add2e14a46e6af748f50 but it broke port aliases and was rightly reverted. It needs some more accuracy on tests that detect what is a number that is_port() and what is a number that is a name in the context of a host alias.

Actions

Also available in: Atom PDF