Skip to content

Commit 149a93c

Browse files
authored
Fix answer function for UDS_HSFZSocket (#4776)
1 parent 3d1763c commit 149a93c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • scapy/contrib/automotive/bmw

scapy/contrib/automotive/bmw/hsfz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def send(self, x):
186186
def recv(self, x=MTU, **kwargs):
187187
# type: (Optional[int], **Any) -> Optional[Packet]
188188
pkt = super(UDS_HSFZSocket, self).recv(x)
189-
if pkt:
189+
if pkt and pkt.control == 1:
190190
return self.outputcls(bytes(pkt.payload), **kwargs)
191191
else:
192192
return pkt

0 commit comments

Comments
 (0)