Re: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-31 Thread Marcelo Ferreira
+516,8 @@
write(fd, &u, sizeof(u));
} else if (r == 0) {
radlog(L_ERR,
-   "Accounting: logout: login entry for NAS %s port %d not
found",
-   nas_name(nas_address), ut.nas_port);
+   "Accounting: logout: login entry for NAS %s port %d
session_id %.8s not found",
+   nas_name(nas_address), ut.nas_port,
ut.session_id);
r = -1;
}
}







Marcelo Ferreira
Canbras TVA Cabo Ltda
Canbras Acesso - STA
Phone: +5511-4993-8728
----------------------------

----- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 30, 2002 7:03 PM
Subject: Re: Error: Accounting: logout: entry for NAS cnet-bsn port
1929379840 has wrong ID


> "Marcelo Ferreira" <[EMAIL PROTECTED]> wrote:
> > I think that the index of radutmp file is port number and when FR
> > receives a STOP accounting packet, the session ID at port position
> > is not the same because many others subscribers has logged in before
> > and, logically, the session ID at that port number position is not
> > the same of the STOP package.
>
>   Ah, of course.
>
>   Hmm... I guess that the only way around this is to hack the radutmp
> module to use the session ID as the key, not the port.
>
>   I think that change will even be backwards compatible.
>
>   Alan DeKok.
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Re: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-31 Thread Miquel van Smoorenburg

In article <001901c1aa40$9f5ebee0$28030280@intranet>,
Marcelo Ferreira <[EMAIL PROTECTED]> wrote:
>but you're right saying that. let's do something different, let's make
>another module
>(rlm_radutmp_session) and the adm could choose what module to use at
>radiusd.conf.

That's code duplication. Like I said, simply have a setting in radiusd.conf
that defines what gets used as the key for radutmp, nas/port or sessionid.

Mike.


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Re: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-31 Thread Marcelo Ferreira

Soory guys,

I didn't check the code right,
it zap the data out, the comment is the wrong thing.
... can we remove it? there is no zap at radutmp_lookup...

again, sorry...

[]s


Marcelo Ferreira
Canbras TVA Cabo Ltda
Canbras Acesso - STA
Phone: +5511-4993-8728


- Original Message -
From: "Marcelo Ferreira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 8:18 AM
Subject: Re: Error: Accounting: logout: entry for NAS cnet-bsn port
1929379840 has wrong ID


> Miquel,
>
> In my case, the port won't change for eache new user because my B-Ras
dosn't
> have fisical ports,
> just logical ones.
>
> but you're right saying that. let's do something different, let's make
> another module
> (rlm_radutmp_session) and the adm could choose what module to use at
> radiusd.conf.
>
> I made the hack for rlm_radutmp last night and I'll try it this morning.
> If it runs good, I'll work at the new module.
>
> BTW, at radzap.c code, I didn't see the code for 'radzap' the data, just a
> comment "Match it, Zap it" and then close(fd), return(0). So I added it
from
> a cistron radzap.
>
> []s
>
> Marcelo Costa
>
> - Original Message -
> From: "Miquel van Smoorenburg" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 30, 2002 8:16 PM
> Subject: Re: Error: Accounting: logout: entry for NAS cnet-bsn port
> 1929379840 has wrong ID
>
>
> > In article <[EMAIL PROTECTED]>,
> >  <[EMAIL PROTECTED]> wrote:
> > >"Marcelo Ferreira" <[EMAIL PROTECTED]> wrote:
> > >> I think that the index of radutmp file is port number and when FR
> > >> receives a STOP accounting packet, the session ID at port position
> > >> is not the same because many others subscribers has logged in before
> > >> and, logically, the session ID at that port number position is not
> > >> the same of the STOP package.
> > >
> > >  Ah, of course.
> > >
> > >  Hmm... I guess that the only way around this is to hack the radutmp
> > >module to use the session ID as the key, not the port.
> > >  I think that change will even be backwards compatible.
> >
> > The reason why it didn't do that is that by using nas/port you can
> > detect it if a stop packet gets lost - a start packet on an
> > active nas/port provides a clue that something is wrong.
> >
> > So it would probably be a good idea to make this configurable.
> >
> > Mike.
> >
> >
> > -
> > List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
> >
>
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Re: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-31 Thread Marcelo Ferreira

Miquel,

In my case, the port won't change for eache new user because my B-Ras dosn't
have fisical ports,
just logical ones.

but you're right saying that. let's do something different, let's make
another module
(rlm_radutmp_session) and the adm could choose what module to use at
radiusd.conf.

I made the hack for rlm_radutmp last night and I'll try it this morning.
If it runs good, I'll work at the new module.

BTW, at radzap.c code, I didn't see the code for 'radzap' the data, just a
comment "Match it, Zap it" and then close(fd), return(0). So I added it from
a cistron radzap.

[]s

Marcelo Costa

- Original Message -
From: "Miquel van Smoorenburg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 30, 2002 8:16 PM
Subject: Re: Error: Accounting: logout: entry for NAS cnet-bsn port
1929379840 has wrong ID


> In article <[EMAIL PROTECTED]>,
>  <[EMAIL PROTECTED]> wrote:
> >"Marcelo Ferreira" <[EMAIL PROTECTED]> wrote:
> >> I think that the index of radutmp file is port number and when FR
> >> receives a STOP accounting packet, the session ID at port position
> >> is not the same because many others subscribers has logged in before
> >> and, logically, the session ID at that port number position is not
> >> the same of the STOP package.
> >
> >  Ah, of course.
> >
> >  Hmm... I guess that the only way around this is to hack the radutmp
> >module to use the session ID as the key, not the port.
> >  I think that change will even be backwards compatible.
>
> The reason why it didn't do that is that by using nas/port you can
> detect it if a stop packet gets lost - a start packet on an
> active nas/port provides a clue that something is wrong.
>
> So it would probably be a good idea to make this configurable.
>
> Mike.
>
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Re: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-30 Thread Miquel van Smoorenburg

In article <[EMAIL PROTECTED]>,
 <[EMAIL PROTECTED]> wrote:
>"Marcelo Ferreira" <[EMAIL PROTECTED]> wrote:
>> I think that the index of radutmp file is port number and when FR
>> receives a STOP accounting packet, the session ID at port position
>> is not the same because many others subscribers has logged in before
>> and, logically, the session ID at that port number position is not
>> the same of the STOP package.
>
>  Ah, of course.
>
>  Hmm... I guess that the only way around this is to hack the radutmp
>module to use the session ID as the key, not the port.
>  I think that change will even be backwards compatible.

The reason why it didn't do that is that by using nas/port you can
detect it if a stop packet gets lost - a start packet on an
active nas/port provides a clue that something is wrong.

So it would probably be a good idea to make this configurable.

Mike.


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Re: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-30 Thread Marcelo Ferreira

Allan,

> ...
> > > Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840
=
> > > has wrong ID
>
> > I found the location of the message rlm_radutmp.c
> >
> > .. in my case, Shasta's port number won't change for each user. this =
> > numer is compiled based on VCI/VPI/Slot/Module=20
> > numbers and it is not based on session ID that is the only unique =
> > identifier of the subscriber.
>
>   Well, THAT sucks.  Then what the heck is the use of the NAS-Port?
> Why is the NAS sending a numeric NAS-Port, which is constant for many
> users?
>
>   Unfortunately, the RFC does NOT require the NAS-Port to be unique
> for each user.  It DOES however state that the NAS-Port is meant to be
> the physical port number on the NAS.
>
>   So Shasta is using it in a way that's NOT expected by most RADIUS
> servers.
>
>   This also means that the Framed-IP-Address+ thing won't work,
> either.


Shasta has an IP Pool configuration... in fact, shasta is much more complex
that a simple RAS.
It is an box that can create virtual routers at trunk side and virtual
switchs at access side.
I can send you many informations about this box if you want.

>
> > Alan, it is possible or fisible to make the rlm_radutmp module use the =
> > sessionID in place of portnumber?
>
>   It's already using the session ID.  The error message comes out
> because the saved session ID is NOT the same as the one in the packet.
>


The session ID is the same and is 8 character long.
I think that the index of radutmp file is port number and when FR receives a
STOP
accounting packet, the session ID at port position is not the same because
many others
subscribers has logged in before and, logically, the session ID at that port
number position
is not the same of the STOP package.


>   This MAY be because the session ID is truncated in the 'radutmp'
> file.  The data structure currently only defines it to be 8
> characters.  Maybe it needs to be more.
>
>   If the session ID is longer than 8 characters, then we can increase
> it's size in the data structure, and the error message will disappear.
>
>   Alan DeKok.
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Re: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-30 Thread aland

"Marcelo Ferreira" <[EMAIL PROTECTED]> wrote:
> I think that the index of radutmp file is port number and when FR
> receives a STOP accounting packet, the session ID at port position
> is not the same because many others subscribers has logged in before
> and, logically, the session ID at that port number position is not
> the same of the STOP package.

  Ah, of course.

  Hmm... I guess that the only way around this is to hack the radutmp
module to use the session ID as the key, not the port.

  I think that change will even be backwards compatible.

  Alan DeKok.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Re: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-30 Thread aland

"Marcelo Ferreira" <[EMAIL PROTECTED]> wrote:
...
> > Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 =
> > has wrong ID

> I found the location of the message rlm_radutmp.c
> 
> .. in my case, Shasta's port number won't change for each user. this =
> numer is compiled based on VCI/VPI/Slot/Module=20
> numbers and it is not based on session ID that is the only unique =
> identifier of the subscriber.

  Well, THAT sucks.  Then what the heck is the use of the NAS-Port?
Why is the NAS sending a numeric NAS-Port, which is constant for many
users?

  Unfortunately, the RFC does NOT require the NAS-Port to be unique
for each user.  It DOES however state that the NAS-Port is meant to be
the physical port number on the NAS.

  So Shasta is using it in a way that's NOT expected by most RADIUS
servers.

  This also means that the Framed-IP-Address+ thing won't work,
either.

> Alan, it is possible or fisible to make the rlm_radutmp module use the =
> sessionID in place of portnumber?

  It's already using the session ID.  The error message comes out
because the saved session ID is NOT the same as the one in the packet.

  This MAY be because the session ID is truncated in the 'radutmp'
file.  The data structure currently only defines it to be 8
characters.  Maybe it needs to be more.

  If the session ID is longer than 8 characters, then we can increase
it's size in the data structure, and the error message will disappear.

  Alan DeKok.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Re: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-30 Thread Marcelo Ferreira



Are you using Shasta or some other aggregator ? I 
am
 
I found the location of the message 
rlm_radutmp.c
 
.. in my case, Shasta's port number won't change 
for each user. this numer is compiled based on VCI/VPI/Slot/Module 
numbers and it is not based on session ID that is 
the only unique identifier of the subscriber.
 
 
Alan, it is possible or fisible to make the 
rlm_radutmp module use the sessionID in place of portnumber?
 
regards    
 
 
Marcelo 
FerreiraCanbras TVA Cabo LtdaCanbras Acesso - STAPhone: 
+5511-4993-8728

  - Original Message - 
  From: 
  Edgard Castro 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, January 30, 2002 5:05 
  PM
  Subject: RE: Error: Accounting: logout: 
  entry for NAS cnet-bsn port 1929379840 has wrong ID
  
  Same 
  here. Several of these. I tought it was because I had several radius 
  servers...
   
  Guess not?
   
  Regards,
  Ed 
  Castro
  
-Original Message-From: Marcelo Ferreira 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, January 
30, 2002 1:19 PMTo: [EMAIL PROTECTED]Subject: 
Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong 
ID
I'm receiving many erros "Wrong ID" as 
below:
 
Error: Accounting: logout: entry for NAS 
cnet-bsn port 1929379840 has wrong ID
 
Is there anyone with the same 
problem?
 
 
regards,
Marcelo 
FerreiraCanbras TVA Cabo LtdaCanbras Acesso - STAPhone: 
+5511-4993-8728


RE: Error: Accounting: logout: entry for NAS cnet-bsn port 1929379840 has wrong ID

2002-01-30 Thread Edgard Castro



Same 
here. Several of these. I tought it was because I had several radius 
servers...
 
Guess 
not?
 
Regards,
Ed 
Castro

  -Original Message-From: Marcelo Ferreira 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, January 
  30, 2002 1:19 PMTo: 
  [EMAIL PROTECTED]Subject: Error: Accounting: 
  logout: entry for NAS cnet-bsn port 1929379840 has wrong 
  ID
  I'm receiving many erros "Wrong ID" as 
  below:
   
  Error: Accounting: logout: entry for NAS cnet-bsn 
  port 1929379840 has wrong ID
   
  Is there anyone with the same 
  problem?
   
   
  regards,
  Marcelo 
  FerreiraCanbras TVA Cabo LtdaCanbras Acesso - STAPhone: 
  +5511-4993-8728