Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alias not taken into account #3399

Closed
kenshin33 opened this issue Apr 9, 2019 · 8 comments
Closed

alias not taken into account #3399

kenshin33 opened this issue Apr 9, 2019 · 8 comments
Assignees
Labels
bug Production bug

Comments

@kenshin33
Copy link

Describe the bug
Any chane in aliases is ignored (Firewall -> Diagnostics -> PfTables -> Alias_in_question ) does not change, and an error message appears int configd logs (see below)

To Reproduce
Steps to reproduce the behavior:

  1. Go to Firewall -> Aliases -> change something
  2. Click on click apply
  3. check configd logs and observe no change in pfTables for that particular alias
  4. See error

Expected behavior
change in aliases is taken into account and not error in logs

Relevant log files

Apr  8 20:15:52 XXXX configd.py: generate template container OPNsense/Filter
Apr  8 20:15:52 XXXX configd.py: [343995a4-9442-4cfa-9f16-64040759aa2a] Inline action failed with OPNsense/Filter OPNsense/Filter/filter_tables.conf label empty or too long at Traceback (most recent call last):   File "/usr/local/opnsense/service/modules/processhandler.py", line 509, in execute     return ph_inline_actions.execute(self, inline_act_parameters)   File "/usr/local/opnsense/service/modules/ph_inline_actions.py", line 51, in execute     filenames = tmpl.generate(parameters)   File "/usr/local/opnsense/service/modules/template.py", line 332, in generate     raise render_exception Exception: OPNsense/Filter OPNsense/Filter/filter_tables.conf label empty or too long
Apr  8 20:15:52 XXXX configd.py: [7d13fa05-febb-4cd2-9f96-70ffb35ca095] Reloading filter
Apr  8 20:15:53 XXXX configd.py: [5c1105e2-77fd-4371-8601-b3ba7d6a3a69] refresh url table aliases

Additional context
Add any other context about the problem here.

Environment
Software version used and hardware type if relevant.
e.g.:

OPNsense 19.1.15 (amd64, OpenSSL).

@AdSchellevis
Copy link
Member

looks like an issue with idna encoding, to debug this we need more details. There might be a specific alias defined which causes this, so question is when did this start and which aliases are configured.

@kenshin33
Copy link
Author

Forgot to mention that I managed to get working again by partially reverting f3dad94#diff-719bb51731cbf6e6151e68afda462de8
I arrived at that conclusion by trying to answer 'what changed?'.

I noticed it yesterday, I tried to add an alias and it had no effect (AFAIK that was the only addition change I made to the alias in the past week or so), removing it didn't change anything so I went down the rabbit hole, which ended at f3dad94#diff-719bb51731cbf6e6151e68afda462de8

As for aliases there are a bunch, want a dump for the relevant parts of config,xml?

@AdSchellevis
Copy link
Member

Sure, with the alias part we should be able to reproduce this easily.
If there are sensible addresses in it, remember to replace them first.

@kenshin33
Copy link
Author

Here is the Alias part, changed names and IPs only.

config.xml.gz

@AdSchellevis
Copy link
Member

@kenshin33 thanks, I could easily reproduce it here with your config.xml. 00b46e0 should fix this in our master branch.

Although I'm not too enthusiastic about the fix, I'm not sure if there's a decent way to fix #3107 other than removing IDN support (which might eventually also be an option)

@AdSchellevis AdSchellevis self-assigned this Apr 9, 2019
@AdSchellevis AdSchellevis added the bug Production bug label Apr 9, 2019
@kenshin33
Copy link
Author

kenshin33 commented Apr 9, 2019

for now removing '|encode_idna'' works, but I'll keep that in mind.
Thanks for info/effort!

@AdSchellevis
Copy link
Member

ok, thanks. I'll close the issue than since there's a fix in master

@gstuartj
Copy link

Related forum thread: https://forum.opnsense.org/index.php?topic=12407.0

Others are also experiencing this issue. It broke a few of my rules after renaming aliases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

3 participants