<div dir="ltr">Hi,<div><br></div><div>I have a setup with a frontend server that proxies all request to a number of backend servers. Depending on the type of the reply packet it supposed to do something extra (like log it into the database and update some aspects of the reply for Access-Accept)</div><div><br></div><div>I've tried this setup:</div><div><br></div><div><div>post-proxy {</div><div><br></div><div>        if (proxy-reply:Packet-Type == Access-Accept ){<br></div></div><div><br></div><div>       ....</div><div>     }</div><div><br></div><div>but it doesn't seem to trigger:</div><div><br></div><div><div>(2)    if (proxy-reply:Packet-Type == Access-Accept )</div><div>(2)    if (proxy-reply:Packet-Type == Access-Accept ) -> FALSE</div><div>(2)  } #  post-proxy = noop</div></div><div><br></div><div>So I decided to map it to different attribute to see what the value actually is:</div><div><br></div><div><div>post-proxy {</div><div><br></div><div>        update control {</div><div>                Filter-Id := "%{proxy-reply:Packet-Type}"</div><div>        }</div><div>        if (proxy-reply:Packet-Type == Access-Accept ){</div></div><div>      </div><div>        ....</div><div>      }</div><div><br></div><div>And this seems to capture the content fine:</div><div><br></div><div><div>(2)   post-proxy {</div><div>(2)   update control {</div><div>(2) EXPAND %{proxy-reply:Packet-Type}</div><div>(2)    --> Access-Accept</div><div>(2)     Filter-Id := '"Access-Accept"'</div><div>(2)   } # update control = noop</div><div>(2)    if (proxy-reply:Packet-Type == Access-Accept )</div><div>(2)    if (proxy-reply:Packet-Type == Access-Accept ) -> FALSE</div><div>(2)  } #  post-proxy = noop</div></div><div><br></div><div><br></div><div>For now I've settled on this setup:</div><div><br></div><div><div>post-proxy {</div><div><br></div><div>        update control {</div><div>                Filter-Id := "%{proxy-reply:Packet-Type}"</div><div>        }</div><div>        if (control:Filter-Id == 'Access-Accept'){</div></div><div> </div><div>       ...</div><div>     }</div><div><br></div><div><br></div><div><div>(2)   post-proxy {</div><div>(2)   update control {</div><div>(2) EXPAND %{proxy-reply:Packet-Type}</div><div>(2)    --> Access-Accept</div><div>(2)     Filter-Id := '"Access-Accept"'</div><div>(2)   } # update control = noop</div><div>(2)    if (control:Filter-Id == 'Access-Accept')</div><div>(2)    if (control:Filter-Id == 'Access-Accept') -> TRUE</div></div><div><br></div><div>That works fine. I just wonder if there's a simpler way of checking the type of the packet? </div><div>(Freeradius 3.0.4)</div><div><br></div><div>kind regards<br>Pshem</div><div><br></div></div>