@@ -83,7 +83,7 @@ static void ipt_osf_send_connector(struct ipt_osf_user_finger *f,
struct ipt_osf_message *msg = &per_cpu(ipt_osf_mbuf, smp_processor_id());
struct ipt_osf_nlmsg *data = &msg->nlmsg;
struct iphdr *iph = ip_hdr(skb);
- struct tcphdr *tcph = tcp_hdr(skb);
+ struct tcphdr *tcp;
memcpy(&msg->cmsg.id, &cn_osf_id, sizeof(struct cn_msg));
msg->cmsg.seq = osf_seq++;
@@ -92,7 +92,9 @@ static void ipt_osf_send_connector(struct ipt_osf_user_finger *f,
memcpy(&data->f, f, sizeof(struct ipt_osf_user_finger));
memcpy(&data->ip, iph, sizeof(struct iphdr));
- memcpy(&data->tcp, tcph, sizeof(struct tcphdr));
+ tcp = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(struct tcphdr), &data->tcp);
+ if (tcp)
+ memcpy(&data->tcp, tcp, sizeof(struct tcphdr));
cn_netlink_send(&msg->cmsg, CN_IDX_OSF, GFP_ATOMIC);
}