Accounting multicast + unacknowledge mode and conflicting packet

François RAGUIN fraguin at wanadoo.fr
Tue Apr 23 22:35:43 CEST 2019


Hello,

We added Acct-Status-Type + Framed-IP-Address + Calling-Station-Id in the log "Received conflicting".
This is to inform applications that consume downstream Radius accounting.
And this while waiting to solve our punctual problems of slow database.

Below is the code for lines 1777 - 1781 of the process.c file before and after modification.
I do not know the function fr_pair_find_by_num very well.
I do not know if there is documentation, but if you have a few minutes, could you look at my code and tell me if there are flagrant errors.

Thank you

Lines 1777 - 1781 of origin
=====================================================
                        ERROR("Received conflicting packet from "
                              "client %s port %d - ID: %u  due to "
                              "unfinished request in module %s.  Giving up on old request.",
                              client->shortname,
                              packet->src_port, packet->id,
                              old_module);


Lines replaced by the lines below
=====================================================

                        char buffer[INET_ADDRSTRLEN];
                        char const   *call_num, *acct_type = NULL;
                        VALUE_PAIR   *vpcli, *vpip, *stype;
                        
                        
                        stype = fr_pair_find_by_num(request->packet->vps, PW_ACCT_STATUS_TYPE, 0, TAG_ANY);
                        vpip = fr_pair_find_by_num(request->packet->vps, PW_FRAMED_IP_ADDRESS, 0, TAG_ANY);
                        vpcli = fr_pair_find_by_num(request->packet->vps, 0, PW_CALLING_STATION_ID, TAG_ANY);
 
 
                        if (vpip && vpcli && stype ) {
                        vp_prints_value(buffer, sizeof(buffer), vpip, '"');
                        call_num = vpcli->vp_strvalue;
                        acct_type = stype->vp_strvalue;
 
                         ERROR("Received conflicting packet from "
                              "client %s port %d - ID: %u  MSISDN: %s  IP-Client: %s ACCT-TYPE: %s due to "
                              "unfinished request in module %s.  Giving up on old request.",
                              client->shortname,
                              packet->src_port, packet->id, call_num, buffer, acct_type,
                              old_module);



 

 

 

 

> Message du 22/04/19 17:21
> De : "Alan DeKok" 
> A : "François RAGUIN" , "FreeRadius users mailing list" 
> Copie à : 
> Objet : Re: Accounting multicast + unacknowledge mode and conflicting packet
> 
> On Apr 22, 2019, at 11:08 AM, François RAGUIN  wrote:
> >
> > I was thinking of post-processing in downstream applications that consume 
> > Radius accouting.
> > The problems are very punctual in percentage, but we are investigating the 
> > performance of the database and the GGSN to open more source ports.
> 
> That's good.
> 
> > It would have been interesting, however, to have the following information 
> > in the "Received conflicting packet" logs: Acct-Status-Type, User-Name, 
> > and Framed-IP-Address
> 
> The conflicting packets will be random, so that information doesn't really 
> matter.
> 
> You can update the log message to add whatever information you want. But 
> it does require source code changes.
> 
> Alan DeKok.
> 
>


More information about the Freeradius-Users mailing list