]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netfilter/nfnetlink_log.c
[SK_BUFF]: Convert skb->tail to sk_buff_data_t
[net-next-2.6.git] / net / netfilter / nfnetlink_log.c
index 5cb30ebba0f4fd1538c7c3bb36f6902ae8109541..9709f94787f824d029f4c1123a7de787cc4b16b4 100644 (file)
@@ -409,15 +409,14 @@ __build_packet_message(struct nfulnl_instance *inst,
                        const struct nf_loginfo *li,
                        const char *prefix, unsigned int plen)
 {
-       unsigned char *old_tail;
        struct nfulnl_msg_packet_hdr pmsg;
        struct nlmsghdr *nlh;
        struct nfgenmsg *nfmsg;
        __be32 tmp_uint;
+       sk_buff_data_t old_tail = inst->skb->tail;
 
        UDEBUG("entered\n");
 
-       old_tail = inst->skb->tail;
        nlh = NLMSG_PUT(inst->skb, 0, 0,
                        NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET,
                        sizeof(struct nfgenmsg));
@@ -509,11 +508,11 @@ __build_packet_message(struct nfulnl_instance *inst,
                NFA_PUT(inst->skb, NFULA_HWADDR, sizeof(phw), &phw);
        }
 
-       if (skb->tstamp.off_sec) {
+       if (skb->tstamp.tv64) {
                struct nfulnl_msg_packet_timestamp ts;
-
-               ts.sec = cpu_to_be64(skb->tstamp.off_sec);
-               ts.usec = cpu_to_be64(skb->tstamp.off_usec);
+               struct timeval tv = ktime_to_timeval(skb->tstamp);
+               ts.sec = cpu_to_be64(tv.tv_sec);
+               ts.usec = cpu_to_be64(tv.tv_usec);
 
                NFA_PUT(inst->skb, NFULA_TIMESTAMP, sizeof(ts), &ts);
        }