FR 3.1 NAS-IP-Address

Scott Armitage S.P.Armitage at lboro.ac.uk
Thu Jun 23 13:58:52 CEST 2016


I noticed an issue using the NAS-IP-Address.  This bug (if it is one) did disappear for a while but now seems to be back.  Is this a bug or should I retrieve the value in a different way?



(26,15)              getUserGroupVlan {
(26,15)                if (!&session-state:Nas-Group) {
(26,15)                  update session-state {
(26,15)                    EXPAND %{sql:SELECT groupid from staffbaseschema.nas where ipaddress = '%{NAS-IP-Address}'::inet}
(26,15)                      Reserved connection (3)
(26,15)                      Executing select query: SELECT groupid from staffbaseschema.nas where ipaddress = ''::inet
rlm_sql_postgresql - Status: PGRES_FATAL_ERROR
rlm_sql_postgresql - 22P02: INVALID TEXT REPRESENTATION
(26,15)                      ERROR: rlm_sql_postgresql: ERROR:  invalid input syntax for type inet: ""
(26,15)                      ERROR: rlm_sql_postgresql: LINE 1: ... groupid from staffbaseschema.nas where ipaddress = ''::inet
(26,15)                      ERROR: rlm_sql_postgresql:                                                                ^
(26,15)                      ERROR: SQL query failed: server error
(26,15)                      Released connection (3)
(26,15)                      Closing connection (4), from 47 unused connections
rlm_sql_postgresql - Socket destructor called, closing socket
(26,15)                    -->
(26,15)                    &session-state:Nas-Group := 0
(26,15)                  } # update session-state (noop)
(26,15)                } # if (!&session-state:Nas-Group) (noop)
(26,15)                if ( !&reply:Tunnel-Private-Group-Id && &session-state:Nas-Group > 1) {
(26,15)                  ...
(26,15)                }
(26,15)              } # getUserGroupVlan (noop)
(26,15)              getWiredUserVlan {
(26,15)                if ("%{client:group}" != "wireless" && !&reply:Tunnel-Private-Group-Id ) {
(26,15)                EXPAND %{client:group}
(26,15)                   --> wireless
(26,15)                  ...
(26,15)                }
(26,15)                if ( &reply:Tunnel-Private-Group-Id == "" ) {
(26,15)                  ...
(26,15)                }
(26,15)              }



do we now have to specify which tunnel?


(13,2)              getUserGroupVlan {
(13,2)                if (!&session-state:Nas-Group) {
(13,2)                  update session-state {
(13,2)                    EXPAND %{sql:SELECT groupid from staffbaseschema.nas where ipaddress = '%{outer.request:NAS-IP-Address}'::inet}
(13,2)                      Reserved connection (1)
(13,2)                      Released connection (1)
(13,2)                      Reserved connection (2)
(13,2)                      Executing select query: SELECT groupid from staffbaseschema.nas where ipaddress = '10.53.253.21'::inet
rlm_sql_postgresql - Status: PGRES_TUPLES_OK
rlm_sql_postgresql - query affected rows = 0 , fields = 1
(13,2)                      SQL query returned no results
(13,2)                      Released connection (2)
(13,2)                    -->
(13,2)                    &session-state:Nas-Group := 0
(13,2)                  } # update session-state (noop)
(13,2)                } # if (!&session-state:Nas-Group) (noop)
(13,2)                if ( !&reply:Tunnel-Private-Group-Id && &session-state:Nas-Group > 1) {
(13,2)                  ...
(13,2)                }
(13,2)              } # getUserGroupVlan (noop)
(13,2)              getWiredUserVlan {
(13,2)                if ("%{client:group}" != "wireless" && !&reply:Tunnel-Private-Group-Id ) {
(13,2)                EXPAND %{client:group}
(13,2)                   --> wireless


Regards


Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20160623/8885a1b8/attachment.sig>


More information about the Freeradius-Users mailing list