<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=koi8-r">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 12">
<meta name=Originator content="Microsoft Word 12">
<link rel=File-List href="cid:filelist.xml@01C9C935.463F6820">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:TargetScreenSize>1024x768</o:TargetScreenSize>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:EnvelopeVis/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>RU</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:DoNotExpandShiftReturn/>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:204;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1073750139 0 0 159 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-noshow:yes;
mso-style-priority:99;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-noshow:yes;
mso-style-priority:99;
color:purple;
text-decoration:underline;
text-underline:single;}
span.EmailStyle17
{mso-style-type:personal-compose;
mso-style-noshow:yes;
mso-style-unhide:no;
mso-ansi-font-size:11.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";
color:windowtext;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
mso-ascii-font-family:Calibri;
mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;
mso-fareast-language:EN-US;}
@page Section1
{size:612.0pt 792.0pt;
margin:2.0cm 42.5pt 2.0cm 3.0cm;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"οΒΩήΞΑΡ ΤΑΒΜΙΓΑ";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=RU link=blue vlink=purple style='tab-interval:35.4pt'>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>hi<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>I have some
problem with <span class=SpellE>perl</span> module in <span class=SpellE>freeradius</span><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>There are
an errors after that radius is fall down<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Tue Apr 28
19:23:07 2009 : Error: <span class=SpellE>rlm_perl</span>: <span class=SpellE>perl_embed</span>::
module = /<span class=SpellE>usr</span>/local/etc/<span class=SpellE>raddb</span>/processing.pl
, <span class=SpellE>func</span> = <span class=SpellE>reject_log</span> exit
status= Undefined subroutine &DBD::<span class=SpellE>mysql</span>::<span
class=SpellE>dr</span>::<span class=SpellE>reject_log</span> called at /<span
class=SpellE>usr</span>/local/lib/perl5/<span class=SpellE>site_perl</span>/5.8.9/mach/DBD/mysql.pm
line 142.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Tue Apr 28
19:45:41 2009 : Error: <span class=SpellE>rlm_perl</span>: <span class=SpellE>perl_embed</span>::
module = /<span class=SpellE>usr</span>/local/etc/<span class=SpellE>raddb</span>/processing.pl
, <span class=SpellE>func</span> = <span class=SpellE>reject_log</span> exit
status= Undefined subroutine &DBD::<span class=SpellE>mysql</span>::<span
class=SpellE>dr</span>::<span class=SpellE>reject_log</span> called at /<span
class=SpellE>usr</span>/local/lib/perl5/<span class=SpellE>site_perl</span>/5.8.9/mach/DBD/mysql.pm
line 142.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Wed Apr 29
15:11:52 2009 : Error: <span class=SpellE>rlm_perl</span>: <span class=SpellE>perl_embed</span>::
module = /<span class=SpellE>usr</span>/local/etc/<span class=SpellE>raddb</span>/processing.pl
, <span class=SpellE>func</span> = <span class=SpellE>reject_log</span> exit
status= Undefined subroutine &DBI::Const::<span class=SpellE>GetInfo</span>::ODBC::<span
class=SpellE>reject_log</span> called at
/usr/local/lib/perl5/site_perl/5.8.9/mach/DBI/Const/GetInfo/ODBC.pm line 1337.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Here is a
processing.pl<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>use strict;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'># use ...<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'># This is
very important ! Without this script will not get the filled <span
class=SpellE>hashesh</span> from main.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>use <span
class=SpellE>vars</span> <span class=SpellE>qw</span>(%RAD_REQUEST %RAD_REPLY
%RAD_CHECK);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>use Data</span>::<span
lang=EN-US style='mso-ansi-language:EN-US'>Dumper</span>;<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>my</span> $<span
lang=EN-US style='mso-ansi-language:EN-US'>username</span>; <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>my</span> $<span
lang=EN-US style='mso-ansi-language:EN-US'>debug</span><span
style='mso-spacerun:yes'> </span>= '1';<span lang=EN-US style='mso-ansi-language:
EN-US'><o:p></o:p></span></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'># This the
remapping of return values<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant<span
style='mso-spacerun:yes'> </span>RLM_MODULE_REJECT=><span
style='mso-spacerun:yes'> </span>0;#<span style='mso-spacerun:yes'>
</span>/* immediately reject the request */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant<span
style='mso-spacerun:yes'> </span>RLM_MODULE_FAIL=><span
style='mso-spacerun:yes'> </span>1;#<span style='mso-spacerun:yes'>
</span>/* module failed, don't reply */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant<span
style='mso-spacerun:yes'> </span>RLM_MODULE_OK=><span
style='mso-spacerun:yes'> </span>2;#<span style='mso-spacerun:yes'>
</span>/* the module is OK, continue */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant <span
style='mso-spacerun:yes'></span>RLM_MODULE_HANDLED=><span
style='mso-spacerun:yes'> </span>3;#<span style='mso-spacerun:yes'>
</span>/* the module handled the request, so stop. */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant<span
style='mso-spacerun:yes'> </span>RLM_MODULE_INVALID=><span
style='mso-spacerun:yes'> </span>4;#<span style='mso-spacerun:yes'>
</span>/* the module considers the request invalid. */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant<span
style='mso-spacerun:yes'> </span>RLM_MODULE_USERLOCK=><span
style='mso-spacerun:yes'> </span>5;#<span style='mso-spacerun:yes'> </span>/*
reject the request (user is locked out) */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant<span
style='mso-spacerun:yes'> </span>RLM_MODULE_NOTFOUND=><span
style='mso-spacerun:yes'> </span>6;#<span style='mso-spacerun:yes'> </span>/*
user not found */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant<span
style='mso-spacerun:yes'> </span>RLM_MODULE_NOOP=><span
style='mso-spacerun:yes'> </span>7;#<span style='mso-spacerun:yes'>
</span>/* module succeeded without doing anything */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant<span
style='mso-spacerun:yes'> </span>RLM_MODULE_UPDATED=><span
style='mso-spacerun:yes'> </span>8;#<span style='mso-spacerun:yes'>
</span>/* OK (pairs modified) */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use constant<span
style='mso-spacerun:yes'> </span>RLM_MODULE_NUMCODES=><span
style='mso-spacerun:yes'> </span>9;#<span style='mso-spacerun:yes'> </span>/*
How many return codes there are */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>sub reject</span>_<span
lang=EN-US style='mso-ansi-language:EN-US'>log</span> {<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span>#<o:p></o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span># -- function to log rejected users in xml
format<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span></span>#<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$username = $RAD_REQUEST{'User-Name'};<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$username =~ s/[^a-zA-Z0-9_-]//g;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>&<span class=SpellE>radiusd</span>::<span
class=SpellE>radlog</span>(1, "DEBUG <span class=SpellE>reject_log</span>:
RAD_REQUEST User-Name: ".$RAD_REQUEST{'User-Name'}) if $debug;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>&<span class=SpellE>radiusd</span>::<span
class=SpellE>radlog</span>(1, "DEBUG <span class=SpellE>reject_log</span>:
<span class=SpellE>UserName</span>: ".$username) if $debug;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $<span class=SpellE>textlog</span>;<span
style='mso-spacerun:yes'> </span>#<span style='mso-spacerun:yes'>
</span>/* !!! Don't comment this line !!! */<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span># Uncomment next line for text log readable
from <span class=SpellE>unix</span> console (by default log in xml)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<span
style='mso-spacerun:yes'> </span>$<span class=SpellE>textlog</span> = '1';<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span># Log file<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $<span class=SpellE>logfile</span> = '/<span
class=SpellE>var</span>/log/radreject.log' if $<span class=SpellE>textlog</span>;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $<span class=SpellE>logfilexml</span> =
'/<span class=SpellE>var</span>/log/radreject.xml';<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>open (LOG, ">>$<span
class=SpellE>logfile</span>") or $RAD_REPLY{'Module-Failure-Message'} =
"<span class=SpellE>rlm_rejectlog</span>: Can't open <span class=SpellE>logfile</span>."
if $<span class=SpellE>textlog</span>;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>open (LOGXML, ">>$<span
class=SpellE>logfilexml</span>") or $RAD_REPLY{'Module-Failure-Message'} =
"<span class=SpellE>rlm_rejectlog</span>: Can't open xml <span
class=SpellE>logfile</span>." and return RLM_MODULE_FAIL;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $now = <span class=SpellE>localtime</span>;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>if ($RAD_REQUEST{'Module-Failure-Message'} <span
class=SpellE>eq</span> "<span class=SpellE>rlm_chap</span>: Wrong user
password") {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>print LOG $now.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>" Password incorrect [ ".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'User-Name'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>." ]. (from ".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'NAS-IP-Address'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>." client ".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'Calling-Station-Id'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>.")\n" if $<span
class=SpellE>textlog</span>;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>print LOGXML "<date>".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$now<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'>
</span>."</date><message>Password
incorrect</message><login>".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'User-Name'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>."</login><<span
class=SpellE>nas</span>>".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'NAS-IP-Address'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>."</<span class=SpellE>nas</span>><<span
class=SpellE>cli_mac</span>>".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'Calling-Station-Id'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>."</<span class=SpellE>cli_mac</span>>\n";<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span><span class=SpellE>elsif</span>($RAD_REQUEST{'Module-Failure-Message'}
<span class=SpellE>eq</span> "<span class=SpellE>rlm_chap</span>: Clear
text password not available") {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span><span
style='mso-spacerun:yes'></span>print LOG $now.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>" Login incorrect [ ".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'User-Name'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>." ]. (from ".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'NAS-IP-Address'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>." client ".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'Calling-Station-Id'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>.")\n" if $<span
class=SpellE>textlog</span>;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>print LOGXML "<date>".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$now<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'>
</span>."</date><message>Login
incorrect</message><login>".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'User-Name'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>."</login><<span
class=SpellE>nas</span>>".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'NAS-IP-Address'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>."</<span class=SpellE>nas</span>><<span
class=SpellE>cli_mac</span>>".<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REQUEST{'Calling-Station-Id'}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>."</<span class=SpellE>cli_mac</span>>\n";<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>else {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>close LOGXML;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>close LOG if $<span class=SpellE>textlog</span>;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>return RLM_MODULE_NOOP;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>close LOGXML;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>close LOG if $<span class=SpellE>textlog</span>;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>return RLM_MODULE_UPDATED;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>sub <span
class=SpellE>post_auth</span> {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span></span>#<o:p></o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span># -- this function add attributes to reply<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span></span>#<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use DBI;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>use Time::<span class=SpellE>HiRes</span> <span
class=SpellE>qw</span>(<span class=SpellE>usleep</span>);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my</span> $<span class=SpellE><span
lang=EN-US style='mso-ansi-language:EN-US'>dblogin</span></span><span
style='mso-spacerun:yes'> </span>= '<span lang=EN-US
style='mso-ansi-language:EN-US'>radius</span>';<o:p></o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $<span class=SpellE>dbpass</span><span
style='mso-spacerun:yes'> </span>= 'secret';<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $<span class=SpellE>dbname</span><span
style='mso-spacerun:yes'> </span>= 'RADDB';<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $<span class=SpellE>dbh</span> =
DBI->connect("dbi:mysql:dbname=$dbname","$dblogin","$dbpass",{PrintError
=> 0})<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>or &<span class=SpellE>radiusd</span>::<span
class=SpellE>radlog</span>(1, "DEBUG <span class=SpellE>post_auth</span>:
DBI error: ".$DBI::<span class=SpellE>errstr</span>) if $debug;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>if</span> ($<span lang=EN-US
style='mso-ansi-language:EN-US'>DBI</span>::<span lang=EN-US style='mso-ansi-language:
EN-US'>err</span> != 0) {<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><span
class=SpellE><span lang=EN-US style='mso-ansi-language:EN-US'>usleep</span></span>(100000);<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><span
lang=EN-US style='mso-ansi-language:EN-US'>$RAD_REPLY {'Reply-Message'} =
"Error connecting to database.";<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>return RLM</span>_<span lang=EN-US
style='mso-ansi-language:EN-US'>MODULE</span>_<span lang=EN-US
style='mso-ansi-language:EN-US'>FAIL</span>;<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span>}<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$username = $RAD_REQUEST{'User-Name'};<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$username =~ s/[^a-zA-Z0-9_-]//g;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>&<span class=SpellE>radiusd</span>::<span
class=SpellE>radlog</span>(1, "DEBUG <span class=SpellE>post_auth</span>:
RAD_REQUEST User-Name: ".$RAD_REQUEST{'User-Name'}) if $debug;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>&<span class=SpellE>radiusd</span>::<span
class=SpellE>radlog</span>(1, "DEBUG <span class=SpellE>post_auth</span>: <span
class=SpellE>UserName</span>: ".$username) if $debug;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $query = "CALL <span class=SpellE>rad_reply</span>('".$username."')";<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $<span class=SpellE>sth</span> = $<span
class=SpellE>dbh</span>->prepare($query);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $<span class=SpellE>rv</span> = $<span
class=SpellE>sth</span>->execute();<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>&<span class=SpellE>radiusd</span>::<span
class=SpellE>radlog</span>(1, "DEBUG: query error: ".$<span
class=SpellE>sth</span>-><span class=SpellE>errstr</span>) if $debug;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><span
style='mso-spacerun:yes'></span><span lang=EN-US style='mso-ansi-language:
EN-US'>if</span> (!<span lang=EN-US style='mso-ansi-language:EN-US'>defined</span>
$<span class=SpellE><span lang=EN-US style='mso-ansi-language:EN-US'>rv</span></span>)
{<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><span
class=SpellE><span lang=EN-US style='mso-ansi-language:EN-US'>usleep</span></span>(100000);<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><span
lang=EN-US style='mso-ansi-language:EN-US'>$RAD_REPLY {'Reply-Message'} =
"Error executing SQL query.";<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'># -- why db
disconnect don’t work in next line? It’s say that db connect
already closed<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<span
style='mso-spacerun:yes'> </span>$<span class=SpellE>dbh</span>->disconnect();<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>return RLM_MODULE_FAIL;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>my $<span class=SpellE>attr_hash</span> = $<span
class=SpellE>sth</span>-><span class=SpellE>fetchrow_hashref</span>();<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>if ($<span class=SpellE>attr_hash</span>->{<span
class=SpellE>is_blocked</span>} == '0'){<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REPLY {'Filter-Id'} = 'allow';<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REPLY {'Framed-IP-Address'} = $<span
class=SpellE>attr_hash</span>->{<span class=SpellE>ip</span>};<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REPLY {'Framed-IP-<span class=SpellE>Netmask</span>'}
= '255.255.255.255';<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>if ($<span class=SpellE>attr_hash</span>->{<span
class=SpellE>attr</span>} ne 'NULL'){<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REPLY {'<span class=SpellE>Mikrotik</span>-Rate-Limit'}
= $<span class=SpellE>attr_hash</span>->{<span class=SpellE>attr</span>};<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span></span>}<o:p></o:p></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>$RAD_REPLY {'Session-Timeout'} = '86400';<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'># -- here
is the same – don’t work </span><span lang=EN-US style='font-family:
Wingdings;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;
mso-ansi-language:EN-US;mso-char-type:symbol;mso-symbol-font-family:Wingdings'><span
style='mso-char-type:symbol;mso-symbol-font-family:Wingdings'>L</span></span><span
lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<span
style='mso-spacerun:yes'> </span>$<span class=SpellE>dbh</span>->disconnect;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>return RLM_MODULE_UPDATED;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Other files<o:p></o:p></span></p>
<p class=MsoNormal><span class=SpellE><span lang=EN-US style='mso-ansi-language:
EN-US'>raddb</span></span><span lang=EN-US style='mso-ansi-language:EN-US'>/modules/<span
class=SpellE>rejectlog</span><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'># This
module made for <span class=SpellE>loggin</span> reject radius answers<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'># using <span
class=SpellE>perl</span> function <span class=SpellE>reject_log</span><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span class=SpellE><span lang=EN-US style='mso-ansi-language:
EN-US'>perl</span></span><span lang=EN-US style='mso-ansi-language:EN-US'> <span
class=SpellE>rejectlog</span> {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>module = /<span class=SpellE>usr</span>/local/etc/<span
class=SpellE>raddb</span>/rejectlog.pl<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span><span class=SpellE>func_post_auth</span> = <span
class=SpellE>reject_log</span><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span class=SpellE><span lang=EN-US style='mso-ansi-language:
EN-US'>raddb</span></span><span lang=EN-US style='mso-ansi-language:EN-US'>/sites-enable/my-site<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>…<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>post-auth {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>Post-Auth-Type REJECT {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span><span class=SpellE>attr_filter.access_reject</span><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span># Log failed logins to xml log
file or to <span class=SpellE>unix</span> log.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>#<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span><span class=SpellE>rejectlog</span><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'></span><span style='mso-spacerun:yes'> </span>#
Perl<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
style='mso-spacerun:yes'> </span><span class=SpellE>perl</span><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>…<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
<p class=MsoNormal><span class=SpellE><span lang=EN-US style='mso-ansi-language:
EN-US'>Radiusd</span></span><span lang=EN-US style='mso-ansi-language:EN-US'>
work fine a little time – an hour or an 2-3 hours but then its fall<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>What can I
do with that errors?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p> </o:p></span></p>
</div>
</body>
</html>