mirror of
https://github.com/xcat2/confluent.git
synced 2025-08-26 13:10:38 +00:00
Fix ethernet support
In accomodating the 20 byte IB hwaddr, it could no longer accept the 6 byte. Adapt to all destination addresses up to 20.
This commit is contained in:
@@ -537,7 +537,9 @@ def send_raw_packet(repview, replen, reqview, info):
|
||||
targ = sockaddr_ll()
|
||||
bcastaddr = get_bcastaddr(ifidx)
|
||||
hwlen = len(bcastaddr)
|
||||
targ.sll_addr = (ctypes.c_ubyte * 20).from_buffer(bcastaddr)
|
||||
bcastaddr20 = bytearray(20)
|
||||
bcastaddr20[:hwlen] = bcastaddr
|
||||
targ.sll_addr = (ctypes.c_ubyte * 20).from_buffer(bcastaddr20)
|
||||
targ.sll_family = socket.AF_PACKET
|
||||
targ.sll_halen = hwlen
|
||||
targ.sll_protocol = socket.htons(0x800)
|
||||
|
Reference in New Issue
Block a user