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 over 8 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 #1

Updated by Phillip Davis almost 9 years ago

I found the dumb error in my previous attempt. This pull request works for me on a system with a mix of nested host/network/port aliases:
https://github.com/pfsense/pfsense/pull/1759

Actions #2

Updated by Renato Botelho almost 9 years ago

  • Status changed from New to Feedback
  • Assignee set to Renato Botelho
  • % Done changed from 0 to 100

Pull request has been merged

Actions #3

Updated by Chris Buechler over 8 years ago

  • Status changed from Feedback to Resolved

works

Actions #4

Updated by Phillip Davis over 8 years ago

Note: This seems to have broken url_port alias processing.
See new bug https://redmine.pfsense.org/issues/4888

Actions

Also available in: Atom PDF