[DGD] network package bug fix

bart at wotf.org bart at wotf.org
Mon Mar 2 20:42:57 CET 2009


Its really nice when others use your code, even when they find bugs in it!

At any rate, there was a somewhat fun bug in the network package, using
query_ip_number() or query_ip_name() on a port object would cause a crash.

The reason for this is that the kfuns only checked for the object having the
user role, which is quite valid in 'vanilla' dgd.

With the network package, port objects also get the user role, but don't have
an associated connection, or the data that goes with that. The only way to
find out what user role an object has is by looking at the flags on the user
struct.

I added a new function to comm.c which tells if something is really a
connection, and use that from the query_ip_number/name kfuns now, which should
solve this issue.

Fix has been committed to svn://wotf.org/dgd-devel-net/

Bart.
--
Created with Open WebMail at http://www.bartsplace.net/
Read my weblog at http://soapbox.bartsplace.net/




More information about the DGD mailing list