Important question about module instantiation

Guilherme Franco guilhermefranco at gmail.com
Thu Oct 26 00:14:42 CEST 2006


Hello,

In sqlippool.conf I've instantiated:

sqlippool DYNAMIC{
...
allocate-find = "SELECT framedipaddress FROM ${ippool_table} \
  WHERE pool_name = '%{check:Pool-Name}' AND expiry_time < 'now'::timestamp(0) \
  ORDER BY RANDOM() \
  LIMIT 1 \
  FOR UPDATE"
...
}

sqlippool STATIC{
...
allocate-find = "SELECT framedipaddress FROM ${ippool_table} \
  WHERE pool_name = '%{check:Pool-Name}' AND expiry_time < 'now'::timestamp(0) \
  ORDER BY (username <> '%{SQL-User-Name}'), (callingstationid <>
'%{Calling-Station-Id}'), expiry_time \
  LIMIT 1 \
  FOR UPDATE"
...
}

So, the first one allocates dynamic IP addresses to the user and the
second assigns static ones.

Then in radiusd.conf:

post-auth {
DYNAMIC
STATIC
...
}

The problem is: when someone who have Pool-Name := STATIC in radcheck
logs in, the sqlippool module used for assigning IP to that user is
DYNAMIC because it was called first than STATIC in radiusd.conf.

As a result the user get a dynamic IP. That's a problem.

What can I do to solve this, please?

Thank you.



More information about the Freeradius-Users mailing list