Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

UDP endpoint mapping uses incorrect masking values.

Đang mở
#304 0 bình luận 1 reaction 1 người được giao Xem trên GitHub

@maksimdrachov đang làm issue này rồi.

Từ ngày 29/6/2023.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

class-defect domain-transport-udp severity-minor
---
 pycyphal/transport/udp/_ip/_endpoint_mapping.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pycyphal/transport/udp/_ip/_endpoint_mapping.py b/pycyphal/transport/udp/_ip/_endpoint_mapping.py
index 6b4168d..f3cf6cc 100644
--- a/pycyphal/transport/udp/_ip/_endpoint_mapping.py
+++ b/pycyphal/transport/udp/_ip/_endpoint_mapping.py
@@ -22,9 +22,9 @@ FIXED_MASK_PREFIX = 0b_11111111_11111111_00000000_00000000
 Masks the 16 most significant bits of the multicast group address. To check whether the address is Cyphal/UDP.
 """
 
-SUBJECT_ID_MASK = 2**15 - 1
+SUBJECT_ID_MASK = 0b_00000000_00000000_00011111_11111111
 """
-Masks the 14 least significant bits of the multicast group address (v4/v6) that represent the subject-ID. (Message)
+Masks the 13 least significant bits of the multicast group address (v4/v6) that represent the subject-ID. (Message)
 """
 
 DESTINATION_NODE_ID_MASK = 0xFFFF
@@ -38,7 +38,7 @@ SNM_BIT_MASK = 0b_00000000_00000001_00000000_00000000
 Service, Not Message: Masks the bit that determines whether the address represents a Message (=0) or Service (=1)
 """
 
-CYPHAL_UDP_IPV4_ADDRESS_VERSION = 0b_00000000_00100000_00000000_00000000
+CYPHAL_UDP_IPV4_ADDRESS_VERSION = 0b_00000000_01000000_00000000_00000000
 """
 Cyphal/UDP uses this bit to isolate IP header version 0 traffic
 (note that the IP header version is not, necessarily, the same as the Cyphal Header version)
-- 
2.37.5

Ngôn ngữ chính
Python
Star
142
Fork
110
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenCyphal/pycyphal

Tất cả issue của OpenCyphal/pycyphal

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.