covalschi

natmanage

Feb 24th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. route[NATMANAGE] {
  2. if (is_request()) {
  3. if(has_totag()) {
  4. if(check_route_param("nat=yes")) {
  5. setbflag(FLB_NATB);
  6. }
  7. }
  8. }
  9.  
  10.  
  11. if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
  12. return;
  13.  
  14. if (is_request()) {
  15. if (!has_totag()) {
  16. if(t_is_branch_route()) {
  17. add_rr_param(";nat=yes");
  18. }
  19. }
  20. }
  21. if (is_reply()) {
  22. if(isbflagset(FLB_NATB)) {
  23. set_contact_alias();
  24. }
  25. }
  26. }
Add Comment
Please, Sign In to add comment