- for (r = 0; r < MAXROUTE && session[s].route[r].ip; r++)
- routeset(s, session[s].route[r].ip, session[s].route[r].mask, 0, 1);
+ routeset(s, session[s].route[r].ip, session[s].route[r].mask, 0, 1);
+ }
+
+ // Static IPs need to be routed if not already
+ // convered by a Framed-Route. Anything else is part
+ // of the IP address pool and is already routed, it
+ // just needs to be added to the IP cache.
+ if (session[s].ip_pool_index == -1) // static ip
+ {
+ if (!routed) routeset(s, session[s].ip, 0, 0, 1);
+ }
+ else
+ cache_ipmap(session[s].ip, s);
+ }