For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

yoni_100721's avatar
yoni_100721
Icon for Nimbostratus rankNimbostratus
Jan 21, 2015

iRule issue

We have this iRule:

 

Code 
when HTTP_REQUEST { 
  [LB::server pool] returns the name of the default pool configured on the virtual server 
  set default_pool [LB::server pool] 
  dpt = default pool trimmed minus .trgc.com 
  set dpt [string trimright $default_pool .trgc.com] 
  g2a = go2agent appended name 
  set g2a "go2agent.trgc.com" 
  go2agent_pool = new full g2a pool name 
  set go2agent_pool "$dpt$g2a" 
  set uri [string tolower [HTTP::uri]] 
  if { $uri starts_with "/go2agent" } { 
  convert URI to not include go2agent
  set nong2a_uri [substr [HTTP::uri] 9] 
  HTTP::uri $nong2a_uri 
  Log new URI and Pool info
  log local0. $nong2a_uri
  log local0. $go2agent_pool 
  pool $go2agent_pool
 } else { 
  pool $default_pool 
 }
}

I know its a mess but long story short if a user goes to http://website.com/go2agent it will send the users to a pool named websitego2agent.trgc.com instead of the default_pool. this works but every other request gets sent to websitego2agengo2agent.trgc.com so it adds go2agen for some reason that I cant figure out.

 

1 Reply

  • We were able to correct the behavior by using [HTTP::host] instead of [LB::server pool] to get the default pool value.