Package: rp-pppoe
Version: 3.8

With the RADIUS plugin pppd sending Caller-Station-ID attribute to
radius server. But it need to know the IP address of caller station. It
use information from 'remotenumber' command line option. I created a
very small patch, which add the 'remotenumber XX:XX:XX:XX:XX:XX' command
line with MAC-address to pppd command line. Withowt it pppd don't send
Caller-Station-ID attribute to radius server. I already using this path
many years at my ISP platform. It working good ! It is very important
for ISP to know remote user IP.
Please, consider to include it in distribution (see attached file).
I created this patch for rp-pppoe version 3.10, but it works with
version 3.8 also.
diff -ru rp-pppoe-3.10.orig/man/pppoe-server.8 rp-pppoe-3.10/man/pppoe-server.8
--- rp-pppoe-3.10.orig/man/pppoe-server.8	2008-06-30 17:00:42.000000000 +0300
+++ rp-pppoe-3.10/man/pppoe-server.8	2009-11-24 04:57:39.000000000 +0200
@@ -160,7 +160,7 @@
 
 .nf
 nodetach noaccomp nobsdcom nodeflate nopcomp novj novjccomp
-default-asyncmap
+default-asyncmap remotenumber EE:EE:EE:EE:EE:EE
 .fi
 
 In addition, the local and remote IP address are set based on the
diff -ru rp-pppoe-3.10.orig/src/pppoe-server.c rp-pppoe-3.10/src/pppoe-server.c
--- rp-pppoe-3.10.orig/src/pppoe-server.c	2008-06-30 17:00:43.000000000 +0300
+++ rp-pppoe-3.10/src/pppoe-server.c	2009-11-24 04:59:12.000000000 +0200
@@ -1754,6 +1754,13 @@
 	sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1 - SessOffset));
 	argv[c++] = buffer;
     }
+    
+    argv[c++] = "remotenumber";
+    snprintf(buffer, SMALLBUF, "%02x:%02x:%02x:%02x:%02x:%02x",
+	   session->eth[0], session->eth[1], session->eth[2],
+	   session->eth[3], session->eth[4], session->eth[5]);
+    argv[c++] = strdup(buffer);
+
     argv[c++] = NULL;
 
     execv(PPPD_PATH, argv);

Reply via email to