Open Side Menu
Skip to contentBrand Logo
Forums
CrowdSRC
Articles
GroupsEventsSuggestionsHow Do I...?
RegisterSign In
  1. DevCentral
  2. Forums
  3. Technical Forum

Forum Discussion

chris_connell_1's avatar
chris_connell_1
Icon for Nimbostratus rankNimbostratus
Aug 10, 2009

if/else vs case statement.

Hello     I'm wandering if its better to try and use a case statement for this irule, so if the dest ip is in the blacklist we discard, if the source is in $client_sources we send to ingres...
The_Bhattman's avatar
The_Bhattman
Icon for Nimbostratus rankNimbostratus
Aug 10, 2009
As you mentioned you are using 2 different conditions which means switch statement will add no value in your code.

 

 

SSO Login Update Coming to DevCentral

DevCentral News

Kevin - June 2026 Featured F5er

DevCentral News

Tyler - May 2026 Featured Member

DevCentral News

Recent Discussions

  • ASM attack signatures not syncing between active and standby F5
    Jun 24, 2026
    P_K
  • Query on source IP preservation for syslog traffic through F5 virtual server
    Jun 23, 2026
    yadvendra
  • Hardware BIG-IP appliance reach EOSS, but the software version running on it not yet?
    Jun 23, 2026
    ahle
  • VPN Communication Error with F5 BIG-IP Edge Client
    Jun 23, 2026
    user_904222
  • simultaneous disabling / enabling of all LTM objects
    Jun 23, 2026
    mtfeliciano
Related Content
  • convert irule from if...else to switch
    Jan 08, 2019
    pirusti
  • How F5 WAF Mitigates 0-Day CVEs - React2Shell Case Study
    Dec 18, 2025
    Hen_Golubenko
  • iRule: switch vs if-elseif-else
    Jul 27, 2005
    Joe_Pruitt
  • BIG-IP BGP Routing Protocol Configuration And Use Cases
    Jan 18, 2024
    Brandon_
  • Comparing iRule Control Statements
    Jan 12, 2011
    Joe_Pruitt