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

DNSDist: Error message is useless userdata #6535

lpmhouben opened this issue Apr 26, 2018 · 2 comments

DNSDist: Error message is useless userdata #6535

lpmhouben opened this issue Apr 26, 2018 · 2 comments


Copy link

@lpmhouben lpmhouben commented Apr 26, 2018

  • Program: dnsdist
  • Issue type: Bug report

Short description

While scripting an advanced config I encountered a bug in the way dnsdist returns errors
back to lua that renders the error message as returned by pcall() into a useless userdata object


  • Operating system: Debian
  • Software version: 1.3.0
  • Software source: PDNS repository for DNSdist 1.3

Steps to reproduce

  1. Install dnsdist
  2. Add the following into a config file:
x = newNMG()
print(pcall(function() x:addMask('banana') end))
  1. Run the code;

Expected behaviour

A readable error message; In this case it should return 'Unable to convert 'banana' to a netmask'

Actual behaviour

it will print 'false userdata' followed by a pointer.

Other information

I've discussed this in IRC with Habbie; they're the one who recommended filing a bug report.

Copy link

@Habbie Habbie commented Apr 26, 2018

it will print 'false userdata' followed by a pointer.

To be clear, the return value from pcall is false and the useless userdata. This needs a sprinkling of rethrow_if_nested and/or some LuaWrapper bindings for exception objects.

Copy link

@chbruyand chbruyand commented Jun 5, 2018

Closing the issue as it has been fixed by #6541

@chbruyand chbruyand closed this Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants