Skip to content

Commit

Permalink
handle null pdu for uplink correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
marenz2569 committed Sep 6, 2024
1 parent c004809 commit 0fa12ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/l2/upper_mac_packet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,9 @@ struct UpperMacCPlaneSignallingPacket {

/// check if this packet is a null pdu
[[nodiscard]] auto is_null_pdu() const -> bool {
return type_ == MacPacketType::kMacResource && address_ == Address{};
return (type_ == MacPacketType::kMacResource && address_ == Address{}) ||
(type_ == MacPacketType::kMacAccess && !tm_sdu_.has_value()) ||
(type_ == MacPacketType::kMacData && !tm_sdu_.has_value());
};

/// check if this packet is part of a downlink fragment
Expand Down

0 comments on commit 0fa12ce

Please sign in to comment.