[RADIATOR] Replacing the Operator-Name with a modified version

Stefan Paetow (OpenSource) oss at eons.net
Fri Mar 10 04:12:45 UTC 2023


Hi,

So we're looking at OpenRoaming, and as part of that we want to make sure
that the Operator-Name is sent in the correct
"4<Openroaming Operator>:<Country>" format.

Currently, we get "1<domain>", which is the 'old' (or 'correct') format for
Wi-Fi networks, so I'm looking at a hook to replace the 1 with a 4 as a
first step. I assume I do that in the PreClientHook or the
PreProcessingHook?

I was thinking that this code would work:

sub {\
my $p = ${$_[0]}; my $oname=$p->get_attr('Operator-Name');\
$oname =~ s/1(.*)$/4\1/g; $p->change_attr('Operator-Name',$oname);\
&main::log($main::LOG_DEBUG,"Operator-Name:$oname, ");\
}

Do I have that right?

With kind regards

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.open.com.au/pipermail/radiator/attachments/20230310/d9b571d9/attachment.html>


More information about the radiator mailing list