From 27cb1ef84a3341994a82d4a2bbd1dd3975c5f1c7 Mon Sep 17 00:00:00 2001 From: Ricky Zhang Date: Sat, 13 Aug 2016 07:33:35 -0400 Subject: [PATCH] Explictly pass SheepVars by af_packet_priv. --- BasiliskII/src/Unix/Linux/NetDriver/sheep_net.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BasiliskII/src/Unix/Linux/NetDriver/sheep_net.c b/BasiliskII/src/Unix/Linux/NetDriver/sheep_net.c index f79b5e21..3d28dff0 100644 --- a/BasiliskII/src/Unix/Linux/NetDriver/sheep_net.c +++ b/BasiliskII/src/Unix/Linux/NetDriver/sheep_net.c @@ -610,6 +610,9 @@ static int sheep_net_ioctl(struct inode *inode, struct file *f, unsigned int cod v->pt.type = htons(ETH_P_ALL); v->pt.dev = v->ether; v->pt.func = sheep_net_receiver; +#ifdef LINUX_26 + v->pt.af_packet_priv = v; +#endif dev_add_pack(&v->pt); #ifndef LINUX_24 dev_unlock_list(); @@ -715,7 +718,11 @@ static int sheep_net_receiver(struct sk_buff *skb, struct net_device *dev, struc static int sheep_net_receiver(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) #endif { +#ifdef LINUX_26 + struct SheepVars *v = (struct SheepVars *)pt->af_packet_priv; +#else struct SheepVars *v = (struct SheepVars *)pt; +#endif struct sk_buff *skb2; int fake; int multicast;