coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
516 stars 258 forks source link

Coova location with Aruba #216

Closed vsidou closed 8 years ago

vsidou commented 8 years ago

Hello.

Note : Is posted the same on Linkedin group. Not sure which is the official support.

Previously i managed successfully used location with openwrt wifi ap using mac auth. When i get the redirection the loc= attributes does appear and contains my specific attribute.

Now i want to try with my aruba Access points. By default (i've checked with Freeradius as logger) the Aruba AP are sending the Aruba-Location-Id = "94:b4:XX:XX:XX:XX" When i set Chilli with these configs (as i did with my openwrt ap) :

HS_RADPROXY=on HS_RADPROXY_LISTEN=192.168.182.1 HS_RADPROXY_CLIENT=192.168.182.1 HS_RADPROXY_SECRET=$HS_RADSECRET HS_RADPROXY_MACACCEPT=on HS_RADPROXY_LOCATTR="14823,6" # Should be Aruba-Location-Id

I don't get the loc= attribute at all in redirection. I've defined in my Aruba AP Mac Auth as authentication to ip 192.168.182.1 and port 1645 (default port).

I can see the chilli logs :

dhcp.c: 730: 0 (Debug) DHCP newconn: 8c:3a:xx:xx:xx:xx chilli.c: 5117: 0 (Debug) New DHCP request from MAC=8C-3A-XX-XX-XX-XX chilli.c: 5120: 0 (Debug) New DHCP connection established chilli.c: 5076: 0 (Debug) New Chilli Connection chilli.c: 3501: 0 (Debug) Password is: 8c3axxxxxxxxxx chilli.c: 3061: 0 (Debug) Remembering VSA chilli.c: 3061: 0 (Debug) Remembering VSA chilli.c: 3061: 0 (Debug) Remembering VSA chilli.c: 3084: 0 (Debug) looking for attr 231 chilli.c: 3089: 0 (Debug) didn't find attr 231 chilli.c: 3084: 0 (Debug) looking for attr 6 chilli.c: 2880: 0 (Debug) Learned location : chilli.c: 2895: 0 (Debug) Learned new-location : 4 old 0 chilli.c: 3537: 0 (Debug) Accepting MAC login

Strange things here : chilli.c: 2880: 0 (Debug) Learned location :

and here : chilli.c: 2895: 0 (Debug) Learned new-location : 4 old 0

Seems the location is either blank or = to 4. Should be equald the AP mac isn't it ? In the end i don't get the loc= attribute in the redirection.

Can someone point me in the right direction please ?

vsidou commented 8 years ago

Answering to my own question after some time :

HS_RADPROXY_LOCATTR="14823,6"

coovachilli uses gengetopt in order to parse arguments. The proxylocattr is defined a multiple meaning it can be defined multiple times. Even if it is defined once in my config, the "comma" is also used in gengetopt as a multiple separator. Meaning 14823 is considered as one PROXY VSA attribute and 6 another one.

If you need to use a Vendor attribute with a comma inside, use it with a Backslash :

HS_RADPROXY_LOCATTR="14823\,6"