]> git.ozlabs.org Git - ppp.git/commit
plugins/radius: Handle bindaddr keyword in radiusclient.conf
authorAdrian Ban <adrian.ban@mantech.ro>
Wed, 3 Apr 2013 20:19:52 +0000 (23:19 +0300)
committerPaul Mackerras <paulus@samba.org>
Sat, 11 May 2013 11:43:37 +0000 (21:43 +1000)
commitd883b2dbafeed3ebd9d7a56ab1469373bd001a3b
tree4af9e37ebba9b9a3d915cab8e08e599de2474633
parentd16a3985eade5280b8e171f5dd0670a91cba0d39
plugins/radius: Handle bindaddr keyword in radiusclient.conf

This adds code to the radius plugin to handle the bindaddr keyword in
/etc/radiusclient/radiusclient.conf, thus allowing the administrator
to specify which local IP address to use when sending packets to the
radius server.

This is very common for setups where the router has multiple
interfaces for upstream and you don't know which connection is active.
In this case sometimes the packet uses the IP of interface 1 and
sometimes uses the IP of interface 2.  With this patch (adapted from
radiusclient-ng) you can specify the IP of the loopback address, and
the plugin will bind to that IP and send the packet with a fixed IP
every time.

Slimmed a little bit at James Carlson's suggestion.

Signed-off-by: Paul Mackerras <paulus@samba.org>
pppd/plugins/radius/ip_util.c
pppd/plugins/radius/options.h
pppd/plugins/radius/sendserver.c