# HG changeset patch # User Sebastien Decugis # Date 1306484223 -32400 # Node ID 712c7bbf101676b85407bf33ec680b8696532dd9 # Parent 3c7964da22626d79cd7432a3a1022d4c2faf6c59 Fix for bug on Origin-State-Id reported in http://lists.freediameter.net/pipermail/help/2011-May/000156.html diff -r 3c7964da2262 -r 712c7bbf1016 libfdcore/p_dw.c --- a/libfdcore/p_dw.c Tue Mar 29 12:04:45 2011 +0900 +++ b/libfdcore/p_dw.c Fri May 27 17:17:03 2011 +0900 @@ -55,6 +55,11 @@ ASSERT(0); /* To check if this really happens, and understand why... */ } + if (! peer->p_hdr.info.runtime.pir_orstate) { + /* It was not already received in CER/CEA, save it now */ + peer->p_hdr.info.runtime.pir_orstate = hdr->avp_value->u32; + } + if (peer->p_hdr.info.runtime.pir_orstate != hdr->avp_value->u32) { TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection.\n", peer->p_hdr.info.pi_diamid,