Hello,
I have two forward zones defined in config file:
forward-zone:
name: “somedomain.com.”
forward-addr: 8.8.8.8
forward-addr: 8.8.4.4
forward-zone:
name: “anotherone.net.”
forward-addr: 8.8.8.8
forward-addr: 8.8.4.4
And when I try to get their names from init function using pythonmod:
def init(id, cfg):
cfg.forwards.next()
print cfg.forwards.name
return True
Attribute error is raised (‘SwigPyObject’ object has no attribute ‘name’). Same when I’m trying to access any other attribute defined in struct config_stub (addrs, hosts, isfirst).
And one more thing… can’t access to mod_env global variable since it is set to None.
print type(mod_env)
<type ‘NoneType’>
Using unbound version 1.4.20
Am I missing something?