Closed shmir closed 6 years ago
The IPv6 header becomes what you put in + the updated values from the auto-update fields. I just had a look and the auto-update for dlen and nxt were missing..now added in the newest master commit.
Thanks, issue solved and merged to python 2.7 branch.
I'm trying to build ip6/tcp packet as following:
from pypacker.layer12 import ethernet from pypacker.layer3 import ip6 from pypacker.layer4 import tcp
packet = ethernet.Ethernet() + ip6.IP6() + tcp.TCP()
packet.ip6 Output: IP6(v_fc_flow=60000000, dlen=0, nxt=0, hlim=0, src='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', dst='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', opts=[], handler=tcp) TCP(sport=DEAD, dport=0, seq=3735928559L, ack=0, off_x2=50, flags=2, win=FFFF, sum=0, urp=0, opts=[], bytes='')
packet.ip6.bin() Output: '`\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xad\x00\x00\xde\xad\xbe\xef\x00\x00\x00\x00P\x02\xff\xff\x00\x00\x00\x00'
It seems that the IPv6 header is empty, except for the header type (6, at the first byte). No payload length, no next header etc.
Is it a bug or am I missing something?
Thanks, Yoram