{"action":"created","issue":{"url":"https://api.github.com/repos/FreeRADIUS/freeradius-server/issues/1240","labels_url":"https://api.github.com/repos/FreeRADIUS/freeradius-server/issues/1240/labels{/name}","comments_url":"https://api.github.com/repos/FreeRADIUS/freeradius-server/issues/1240/comments","events_url":"https://api.github.com/repos/FreeRADIUS/freeradius-server/issues/1240/events","html_url":"https://github.com/FreeRADIUS/freeradius-server/issues/1240","id":106789700,"number":1240,"title":"Problems with reference '&' in switch","user":{"login":"jpereira","id":254448,"avatar_url":"https://avatars.githubusercontent.com/u/254448?v=3","gravatar_id":"","url":"https://api.github.com/users/jpereira","html_url":"https://github.com/jpereira","followers_url":"https://api.github.com/users/jpereira/followers","following_url":"https://api.github.com/users/jpereira/following{/other_user}","gists_url":"https://api.github.com/users/jpereira/gists{/gist_id}","starred_url":"https://api.github.com/users/jpereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpereira/subscriptions","organizations_url":"https://api.github.com/users/jpereira/orgs","repos_url":"https://api.github.com/users/jpereira/repos","events_url":"https://api.github.com/users/jpereira/events{/privacy}","received_events_url":"https://api.github.com/users/jpereira/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-16T14:49:40Z","updated_at":"2015-09-16T15:11:58Z","closed_at":null,"body":"Hi,\r\n\r\nMaybe we have a bug with reference in switch\r\n\r\ne.g:\r\n\r\nThis works fine\r\n```\r\n switch \"%{proxy-reply:Packet-Type}\" {\r\n.....\r\n switch \"%{Packet-Type}\" {\r\n\r\n```\r\n\r\nbut, not with &\r\n```\r\n switch &proxy-reply:Packet-Type {\r\n....\r\n switch &Packet-Type {\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/FreeRADIUS/freeradius-server/issues/comments/140772032","html_url":"https://github.com/FreeRADIUS/freeradius-server/issues/1240#issuecomment-140772032","issue_url":"https://api.github.com/repos/FreeRADIUS/freeradius-server/issues/1240","id":140772032,"user":{"login":"jpereira","id":254448,"avatar_url":"https://avatars.githubusercontent.com/u/254448?v=3","gravatar_id":"","url":"https://api.github.com/users/jpereira","html_url":"https://github.com/jpereira","followers_url":"https://api.github.com/users/jpereira/followers","following_url":"https://api.github.com/users/jpereira/following{/other_user}","gists_url":"https://api.github.com/users/jpereira/gists{/gist_id}","starred_url":"https://api.github.com/users/jpereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpereira/subscriptions","organizations_url":"https://api.github.com/users/jpereira/orgs","repos_url":"https://api.github.com/users/jpereira/repos","events_url":"https://api.github.com/users/jpereira/events{/privacy}","received_events_url":"https://api.github.com/users/jpereira/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T15:11:58Z","updated_at":"2015-09-16T15:11:58Z","body":"Strange... because into in an if() i can use the reference as below example.\r\n\r\n```\r\n 56         # some home-server-pool was used?\r\n 57         switch \"%{proxy-reply:Packet-Type}\" {\r\n 58             case CoA-ACK {\r\n 59                 linelog-coa-ack\r\n 60\r\n 61                 update reply {\r\n 62                     &Reply-Message := \"Hi '%{User-Name}', your wish is my command!\"\r\n 63                 }\r\n 64             }\r\n 65\r\n 66             case Disconnect-ACK {\r\n 67                 linelog-coa-ack\r\n 68\r\n 69                 update reply {\r\n 70                     &Reply-Message := \"Hi '%{User-Name}', you was disconnected with success!\"\r\n 71                 }\r\n 72             }\r\n 73\r\n 74             case {\r\n 75                 linelog-coa-nak\r\n 76\r\n 77                 if (&proxy-reply:Packet-Type != CoA-ACK && &proxy-reply:Packet-Type != Disconnect-ACK) {\r\n 78                    update reply {\r\n 79                        &Reply-Message := \"Oops! Sorry '%{client:shortname}', the NAS '%{control:Home-Server-Pool}' reply: '%{%{proxy-reply:Reply-Message}:-NULL}'\"\r\n 80                    }\r\n 81                 }\r\n 82             }\r\n 83         }\r\n```"}}