0

I've created python auth module. When trying to perform testing with radtest reply is:

    User-Password = "testing123"
    NAS-IP-Address = 127.0.1.1
    NAS-Port = 0
    Message-Authenticator = 0x00
    Cleartext-Password = "testing123"
Received Access-Accept Id 188 from 127.0.0.1:1812 to 0.0.0.0:0 length 48
    ERX-Service-Activate:0 = "srs-local-ipoe"

As you can see the ERX-Service-Activate has only one zero tagged attribute.

But radiusd -X shows me another output:

authorize - 'reply:ERX-Service-Activate:1' = 'srs-local-ipoe'
authorize - 'reply:ERX-Service-Activate:2' = 'srs-localnet-ipoe(110000)'
authorize - 'reply:ERX-Service-Activate:3' = 'srs-foreignnet-ipoe(110000,110000)'
authorize - 'config:Auth-Type' = 'Accept'
authorize - 'config:Cleartext-Password' = 'testing123'

How to get all ERX-Service-Activate tagged attributes.

Python construct reply:

reply = (('Framed-IP-Address', str(client.ipv4)),
             ('ERX-Service-Activate:1', 'srs-local-ipoe'),
             ('ERX-Service-Activate:2',
              'srs-localnet-ipoe(%s)' % str(client.s_localnet)),
             ('ERX-Service-Activate:3',
              'srs-foreign-ipoe(%s,%s)' % (str(client.s_foreign),
                                          str(client.s_localnet))),)

P.S. Reply in Wireshark has only one ERX-Service-Activate attribute too.

0

Issue fixed in freeradius version 3.0.17

Also reply should be modified a little bit:

  reply = (('Framed-IP-Address', str(client.ipv4)),
         ('ERX-Service-Activate:1', 'srs-local-ipoe'),
         ('ERX-Service-Activate:2', '+=',
          'srs-localnet-ipoe(%s)' % str(client.s_localnet)),
         ('ERX-Service-Activate:3', '+=',
          'srs-foreign-ipoe(%s,%s)' % (str(client.s_foreign),
                                      str(client.s_localnet))),)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.