[Devel] Issue with Diversion header

Dan Pascu dan at ag-projects.com
Thu Jan 5 21:46:23 CET 2006


There seems to be a problem with the diversion module regarding how it 
parses the existing Diversion headers in failure routes. This is with 
openser 1.0.x

If a message comes in, already having a Diversion header and I call 
add_diversion() in the main route everything is fine.
However if I call add_diversion() in failure route it crashes openser with 
a signal 6.

A trace shows that in diversion.c in add_diversion_helper() if I'm in the 
main route msg->diversion is set, msg->diversion->type is HDR_DIVERSION_T 
and msg->diversion->name.s points to the top diversion header name and 
everythign is fine. The new diversion header is added on top of the 
others as expected.

If I'm in a failure route, msg->diversion is set, but msg->diversion->type 
is HDR_OTHER_T (i.e. 0x00), msg->diversion->name is {s=NULL, len=0} 

and add_diversion_helper crashes when it tries to call 

anchor = anchor_lump(msg, ptr - msg->buf, 0, 0);

because ptr is 0x0 

The error message in syslog when it crashes is:

BUG: anchor_lump: offset exceeds message size (1246003784 > 1071) 
aborting... 
child process 12783 exited by a signal 6

-- 
Dan



More information about the Devel mailing list