Skip to content
Snippets Groups Projects
Commit 795ed408 authored by rbu@localhost.localdomain's avatar rbu@localhost.localdomain
Browse files

L3PacketSocket does not set correct ethertype for IPv6 when using TUN devices.

Change send method in L3PacketSocket to detect the type of the packet to send
and set ethertype magic accordingly.
parent c5fa52bb
No related branches found
No related tags found
No related merge requests found
......@@ -376,8 +376,8 @@ class L3PacketSocket(SuperSocket):
self.outs.bind(sdto)
sn = self.outs.getsockname()
ll = lambda x:x
if sn[3] in (ARPHDR_PPP,ARPHDR_TUN):
sdto = (iff, ETH_P_IP)
if type(x) in conf.l3types:
sdto = (iff, conf.l3types[type(x)])
if sn[3] in conf.l2types:
ll = lambda x:conf.l2types[sn[3]]()/x
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment