Skip to content
  • Vladimír Čunát's avatar
    3f60ad2d
    policy: purge pointer-casting where not necessary · 3f60ad2d
    Vladimír Čunát authored
    Casting is dangerous, e.g. it's easy to misconfigure policy with
      policy.add(policy.FORWARD('some address'))
    which lead to segfault without showing any indication of the cause.
    Now this case will show as
      .../policy.lua:98: 'struct kr_query' has no member named 'current'
    and only abort the policy module instead of the whole process.
    3f60ad2d
    policy: purge pointer-casting where not necessary
    Vladimír Čunát authored
    Casting is dangerous, e.g. it's easy to misconfigure policy with
      policy.add(policy.FORWARD('some address'))
    which lead to segfault without showing any indication of the cause.
    Now this case will show as
      .../policy.lua:98: 'struct kr_query' has no member named 'current'
    and only abort the policy module instead of the whole process.
Loading