smartbgp / yabgp

:bowtie:Yet Another BGP Python Implementation
http://yabgp.readthedocs.org
Apache License 2.0
237 stars 70 forks source link

attr 29 unparsed #155

Closed zlpqingmei closed 1 year ago

zlpqingmei commented 1 year ago

image

when attr 29 is before NLRI in the message, attr 29 is unparsed because protocol id has not been parsed yet

data_bin = b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" \
                   b"\x00\x89\x02\x00\x00\x00" \
                   b"\x72\x40\x01\x01\x00\x40\x02\x00\x40\x05\x04\x00\x00\x00\x64\x80" \
                   b"\x1d\x31\x04\x00\x00\x01\x00\x04\x02\x00\x19\x53\x47\x50\x2d\x45" \
                   b"\x51\x49\x58\x2d\x54\x43\x2d\x52\x4f\x55\x54\x45\x52\x2d\x30\x31" \
                   b"\x2e\x53\x47\x50\x04\x03\x00\x03\x65\x00\x01\x04\x04\x00\x04\xac" \
                   b"\x1d\x20\xfa\x90\x0e\x00\x2c\x40\x04\x47\x04\xac\x1f\x16\xee\x00" \
                   b"\x00\x01\x00\x1f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00" \
                   b"\x12\x02\x00\x00\x04\x00\x00\xff\xfd\x02\x03\x00\x06\x17\x20\x29" \
                   b"\x03\x22\x50"