If not found, return an AccessAccept without VLAN details
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Steve McMaster 2022-10-16 21:19:40 +00:00
parent 4211978f03
commit f305d03668

View File

@ -69,8 +69,11 @@ class VlanAssign(ServerAsync):
if mac_address != pkt["NAS-Identifier"][0]: if mac_address != pkt["NAS-Identifier"][0]:
reply = self.CreateReplyPacket(pkt) reply = self.CreateReplyPacket(pkt)
reply.code = AccessReject reply.code = AccessReject
elif mac_address not in self.usermap:
reply = self.CreateReplyPacket(pkt)
reply.code = AccessAccept
else: else:
vlan = str(self.usermap.get(mac_address, self.default_vlan)) vlan = str(self.usermap[mac_address])
reply = self.CreateReplyPacket(pkt, **{ reply = self.CreateReplyPacket(pkt, **{
"Tunnel-Type": [13], "Tunnel-Type": [13],