Re: Double radius accounting

James Cameron <[email protected]> Fri, 15 Nov 2013 08:05:05 +1100
Newsgroups gmane.network.poptop
Organization Netrek Vanilla Server Dictator
Message-ID <[email protected]>
On Thu, Nov 14, 2013 at 11:29:13AM +0100, Lorenzo Milesi wrote:
> I tried removing 
> plugin radattr.so 
> from my "options" file, the accounting is still done, and still with
> dupes. The radius.so plugin remains loaded twice, but compared to
> the above log one is from config and one from command line:
> Nov 14 11:15:26 hotspotserver-dev pppd[29434]: plugin radius.so#011#011# (from /etc/ppp/options)
> Nov 14 11:15:26 hotspotserver-dev pppd[29434]: plugin radius.so#011#011# (from command line)
> 
> I don't understand how and from where the command and its parameters
> are generated.

These are generated by pptpd in the per connection process, you can
find the code in pptpctrl.c

http://sourceforge.net/p/poptop/git/ci/master/tree/pptpctrl.c

On Thu, Nov 14, 2013 at 11:36:04AM +0100, Lorenzo Milesi wrote:
> BTW from the running processess the pppd command is:
> root     29480  0.0  0.0  10196   720 ?        Ss   11:22   0:00 /usr/sbin/pptpd
> root     29508  0.0  0.0  14396   852 ?        S    11:22   0:00  \_ pptpd [100.70.2.234:A5E8 - 0000]                                                                                       
> root     29509  0.0  0.0  27812  1424 pts/2    Ss+  11:22   0:00      \_ /usr/sbin/pppd local file /etc/ppp/options 115200 10.252.9.1:10.252.10.1 ipparam 100.70.2.234 plugin /usr/lib/pptpd/pptpd-logwtmp.so pptpd-original-ip 100.70.2.234

It is strange that there is no plugin option for radius in either
pptpctrl.c or the above command, and yet pppd has reported one from
the command line.  This suggests a bug in pppd command line
processing, or something strange about the command line.

There have been recent changes in the code that prepares this command
line.  Let's look at it more closely.

For process 29509 (or another process in the same operating position)
please capture /proc/29509/cmdline, e.g.

# xxd -g 1 /proc/29509/cmdline

Thanks!

-- 
James Cameron
http://quozl.linux.org.au/

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk