mirror of
https://github.com/jakobadam/RDSFactor.git
synced 2025-06-12 15:34:31 +02:00
Using IsValid on the RadiusPacket
This commit is contained in:
parent
8bbd742aaa
commit
6afe01e932
2 changed files with 10 additions and 14 deletions
|
@ -118,11 +118,19 @@ Public Class CICRadarR
|
||||||
' will fire up the callback procedure. Invalid requests are dropped, per RFC.
|
' will fire up the callback procedure. Invalid requests are dropped, per RFC.
|
||||||
Private Sub ProcessPacket1812(ByVal packet As RADIUSPacket)
|
Private Sub ProcessPacket1812(ByVal packet As RADIUSPacket)
|
||||||
'Console.WriteLine("packet " & Now)
|
'Console.WriteLine("packet " & Now)
|
||||||
ProcessPacket(radius1812, packet)
|
If packet.IsValid Then
|
||||||
|
ProcessPacket(radius1812, packet)
|
||||||
|
Else
|
||||||
|
Console.WriteLine("Packet is not valid. Dropping.")
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ProcessPacket1645(ByVal packet As RADIUSPacket)
|
Private Sub ProcessPacket1645(ByVal packet As RADIUSPacket)
|
||||||
ProcessPacket(radius1645, packet)
|
If packet.IsValid Then
|
||||||
|
ProcessPacket(radius1645, packet)
|
||||||
|
Else
|
||||||
|
Console.WriteLine("Packet is not valid. Dropping.")
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AccessLog(ByVal message)
|
Private Sub AccessLog(ByVal message)
|
||||||
|
|
|
@ -30,10 +30,6 @@ Public Class RDSHandler
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub ProcessRequest()
|
Public Sub ProcessRequest()
|
||||||
If ValidPacket() = False Then
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
ExtractAttributes()
|
ExtractAttributes()
|
||||||
|
|
||||||
If mIsAppLaunchRequest Then
|
If mIsAppLaunchRequest Then
|
||||||
|
@ -231,14 +227,6 @@ Public Class RDSHandler
|
||||||
Return email
|
Return email
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ValidPacket()
|
|
||||||
If mPacket.UserName Is Nothing Then
|
|
||||||
Console.WriteLine("Not a valid radius packet.. No username present.. Drop!")
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
Return True
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Sub ExtractAttributes()
|
Private Sub ExtractAttributes()
|
||||||
packetUsername = mPacket.UserName.ToLower
|
packetUsername = mPacket.UserName.ToLower
|
||||||
packetPassword = mPacket.UserPassword
|
packetPassword = mPacket.UserPassword
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue