diff --git a/py25/bacpypes/bvllservice.py b/py25/bacpypes/bvllservice.py index ecfb501..2588f4c 100755 --- a/py25/bacpypes/bvllservice.py +++ b/py25/bacpypes/bvllservice.py @@ -546,11 +546,6 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents): return - # check the BBMD registration status, we may not be registered - if self.registrationStatus != 0: - if _debug: BIPForeign._debug(" - packet dropped, unregistered") - return - if isinstance(pdu, OriginalUnicastNPDU): # build a vanilla PDU xpdu = PDU(pdu.pduData, source=pdu.pduSource, destination=pdu.pduDestination, user_data=pdu.pduUserData) @@ -559,6 +554,11 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents): self.response(xpdu) elif isinstance(pdu, ForwardedNPDU): + # check the BBMD registration status, we may not be registered + if self.registrationStatus != 0: + if _debug: BIPForeign._debug(" - packet dropped, unregistered") + return + # make sure the forwarded PDU from the bbmd if pdu.pduSource != self.bbmdAddress: if _debug: BIPForeign._debug(" - packet dropped, not from the BBMD") @@ -626,6 +626,9 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents): # send it downstream self.request(xpdu) + elif isinstance(pdu, OriginalBroadcastNPDU): + if _debug: BIPForeign._debug(" - packet dropped") + else: BIPForeign._warning("invalid pdu type: %s", type(pdu)) diff --git a/py27/bacpypes/bvllservice.py b/py27/bacpypes/bvllservice.py index f3d4276..a114714 100755 --- a/py27/bacpypes/bvllservice.py +++ b/py27/bacpypes/bvllservice.py @@ -542,11 +542,6 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents): return - # check the BBMD registration status, we may not be registered - if self.registrationStatus != 0: - if _debug: BIPForeign._debug(" - packet dropped, unregistered") - return - if isinstance(pdu, OriginalUnicastNPDU): # build a vanilla PDU xpdu = PDU(pdu.pduData, source=pdu.pduSource, destination=pdu.pduDestination, user_data=pdu.pduUserData) @@ -555,6 +550,11 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents): self.response(xpdu) elif isinstance(pdu, ForwardedNPDU): + # check the BBMD registration status, we may not be registered + if self.registrationStatus != 0: + if _debug: BIPForeign._debug(" - packet dropped, unregistered") + return + # make sure the forwarded PDU from the bbmd if pdu.pduSource != self.bbmdAddress: if _debug: BIPForeign._debug(" - packet dropped, not from the BBMD") @@ -622,6 +622,9 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents): # send it downstream self.request(xpdu) + elif isinstance(pdu, OriginalBroadcastNPDU): + if _debug: BIPForeign._debug(" - packet dropped") + else: BIPForeign._warning("invalid pdu type: %s", type(pdu)) diff --git a/py34/bacpypes/bvllservice.py b/py34/bacpypes/bvllservice.py index c382387..577deb7 100755 --- a/py34/bacpypes/bvllservice.py +++ b/py34/bacpypes/bvllservice.py @@ -541,11 +541,6 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents): return - # check the BBMD registration status, we may not be registered - if self.registrationStatus != 0: - if _debug: BIPForeign._debug(" - packet dropped, unregistered") - return - if isinstance(pdu, OriginalUnicastNPDU): # build a vanilla PDU xpdu = PDU(pdu.pduData, source=pdu.pduSource, destination=pdu.pduDestination, user_data=pdu.pduUserData) @@ -554,6 +549,11 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents): self.response(xpdu) elif isinstance(pdu, ForwardedNPDU): + # check the BBMD registration status, we may not be registered + if self.registrationStatus != 0: + if _debug: BIPForeign._debug(" - packet dropped, unregistered") + return + # make sure the forwarded PDU from the bbmd if pdu.pduSource != self.bbmdAddress: if _debug: BIPForeign._debug(" - packet dropped, not from the BBMD") @@ -621,6 +621,9 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents): # send it downstream self.request(xpdu) + elif isinstance(pdu, OriginalBroadcastNPDU): + if _debug: BIPForeign._debug(" - packet dropped") + else: BIPForeign._warning("invalid pdu type: %s", type(pdu))