<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>I’m running FR 2.1.6 (I know - I plan to upgrade later this year). Is there anything wrong syntactically with the following code or is this a bug that was fixed since 2.1.6?</div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Courier New, monospace">if (Client-IP-Address == "172.20.16.28" || Client-IP-Address == "172.20.204.10")) {</font></div>
<div><font face="Courier New, monospace"> update request {</font></div>
<div><font face="Courier New, monospace"> Huntgroup-Name := "GlobalRoaming"</font></div>
<div><font face="Courier New, monospace"> }</font></div>
<div><font face="Courier New, monospace">}</font></div>
<div><font face="Courier New, monospace"> </font></div>
<div><font face="Courier New, monospace">#</font></div>
<div><font face="Courier New, monospace"># If NAS is an autonomous AP, get SSID from Cisco-AVPair</font></div>
<div><font face="Courier New, monospace">#</font></div>
<div><font face="Courier New, monospace">if (Huntgroup-Name == "EEProdAP" || \</font></div>
<div><font face="Courier New, monospace"> Huntgroup-Name == "EETestAP") {</font></div>
<div><font face="Courier New, monospace"> if (Cisco-AVPair =~ /ssid=(.*)/) {</font></div>
<div><font face="Courier New, monospace"> update request {</font></div>
<div><font face="Courier New, monospace"> SSID-Name = "%{1}"</font></div>
<div><font face="Courier New, monospace"> }</font></div>
<div><font face="Courier New, monospace"> }</font></div>
<div><font face="Courier New, monospace">}</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Courier New, monospace">I ask because the first if statement only works if the Client-IP-Address matches the first address listed (172.20.16.28). I would expect that it would evaluate to true if Client-IP-Address matches either of the addresses.
Here’s a snippet of debug output that illustrates the problem – it doesn’t appear to finish the logical or comparison:</font></div>
<div><font face="Courier New, monospace"> </font></div>
<div><font face="Courier New, monospace">Info: ++? if (Called-Station-Id && (Client-IP-Address == "172.20.16.28" || Client-IP-Address == "172.20.204.10"))</font></div>
<div><font face="Courier New, monospace">Info: ? Evaluating (Called-Station-Id ) -> TRUE</font></div>
<div><font face="Courier New, monospace">Info: expand: %{Client-IP-Address} -> 172.20.204.10</font></div>
<div><font face="Courier New, monospace">Info: ++? if (Huntgroup-Name == "EEProdAP" || Huntgroup-Name == "EETestAP")</font></div>
<div><font face="Courier New, monospace">Info: (Attribute Huntgroup-Name was not found)</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Courier New, monospace">When I switch the order of the addresses for the logical or, I see the following in debug (it does the comparison and returns TRUE):</font></div>
<div><font face="Courier New, monospace"> </font></div>
<div><font face="Courier New, monospace">Info: ++? if (Called-Station-Id && (Client-IP-Address == "172.20.204.10" || Client-IP-Address == "172.20.16.28"))</font></div>
<div><font face="Courier New, monospace">Info: ? Evaluating (Called-Station-Id ) -> TRUE</font></div>
<div><font face="Courier New, monospace">Info: expand: %{Client-IP-Address} -> 172.20.204.10</font></div>
<div><font face="Courier New, monospace">Info: ?? Evaluating (Client-IP-Address == "172.20.204.10" ) -> TRUE</font></div>
<div><font face="Courier New, monospace">Info: ?? Skipping (Client-IP-Address == "172.20.16.28")</font></div>
<div><font face="Courier New, monospace">Info: ++? if (Called-Station-Id && (Client-IP-Address == "172.20.204.10" || Client-IP-Address == "172.20.16.28")) -> TRUE</font></div>
<div><font face="Courier New, monospace">Info: ++- entering if (Called-Station-Id && (Client-IP-Address == "172.20.204.10" || Client-IP-Address == "172.20.16.28")) {...}</font></div>
<div><font face="Courier New, monospace">Info: +++[request] returns ok</font></div>
<div><font face="Courier New, monospace">Info: ++- if (Called-Station-Id && (Client-IP-Address == "172.20.204.10" || Client-IP-Address == "172.20.16.28")) returns ok</font></div>
<div><font face="Courier New, monospace">Info: ++? if (Huntgroup-Name == "EEProdAP" || Huntgroup-Name == "EETestAP")</font></div>
<div><font face="Courier New, monospace">Info: ? Evaluating (Huntgroup-Name == "EEProdAP" ) -> FALSE</font></div>
<div><font face="Courier New, monospace">Info: ? Evaluating (Huntgroup-Name == "EETestAP") -> FALSE</font></div>
<div><font face="Courier New, monospace">Info: ++? if (Huntgroup-Name == "EEProdAP" || Huntgroup-Name == "EETestAP") -> FALSE</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
</font>
</body>
</html>