is_be is used for location rewriting. If the backend throws a redirect, and the address is one of our known backends, then we can rewrite the redirect to point to the proxy address. (as you usually wouldn’t want the client to try to hit the backend directly, and it’s even possible it can’t hit the backend directly because it might be a private address)
Why would you want to remove this? Joe From: Raj Kishore1/CHN/TCS [mailto:raj.kisho...@tcs.com] Sent: Wednesday, March 06, 2013 3:48 AM To: pound@apsis.ch Subject: [Pound Mailing List] Location comarision with backend address & host Hi, In pound 1.9 version, function "is_be" function in file svc.c is written to find if a host is in our list of back-ends. Could anyone explain the need of such comparision of the location address with list of backend address and with to_host . What could be the effect in pound if this function is removed? Comparision:- if(memcmp(&to_host->sin_addr, &addr.sin_addr, sizeof(addr.sin_addr)) == 0 && memcmp(&to_host->sin_port, &addr.sin_port, sizeof(addr.sin_port)) == 0) return 1; for(i = 0; i < grp->tot_pri; i++) if(memcmp(&grp->backend_addr[i].addr.sin_addr, &addr.sin_addr, sizeof(addr.sin_addr)) == 0 && memcmp(&grp->backend_addr[i].addr.sin_port, &addr.sin_port, sizeof(addr.sin_port)) == 0) return 1; return 0; Thanks Raj Kishore =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you