Stripping the calling station id

Alan DeKok aland at deployingradius.com
Fri Jun 22 15:13:56 CEST 2018


> On Jun 22, 2018, at 9:06 AM, Kefi Ammar . <kefiammar at gmail.com> wrote:
> 
> This is the whole debug from my server containing the service start and a
> recieved request :

  Which doesn't include the regular expression I said to use.

  So... where did you put it?  And why did you put it there?

  It should go into the "authorize" section of "sites-enabled/default".  This should be clear from the documentation, examples, and debug output.

  Since you're running 2.1.12 (WHY? there's NO reason for that), you'll have to use this instead:

	update request {
		NAS-Port-Id += "%{Calling-Station-ID}"
	}

	if (Calling-Station-Id =~ /pppoe ([^#]+#/) {
		update request {
			Calling-Station-ID := "${1}"
		}
	}

  And PLEASE think about where you put that piece.  It does matter.  And no, I'm not going to tell you.  At some point you need to *understand* the configuration.  Now is a good time to learn.

  Alan DeKok.




More information about the Freeradius-Users mailing list