[NETFILTER]: nf_conntrack: const annotations in nf_conntrack_sctp, nf_nat_proto_gre
[safe/jmp/linux-2.6] / net / netfilter / nf_conntrack_proto_sctp.c
index 2d47351..cbf2e27 100644 (file)
@@ -33,7 +33,7 @@ static DEFINE_RWLOCK(sctp_lock);
 
    And so for me for SCTP :D -Kiran */
 
-static const char *sctp_conntrack_names[] = {
+static const char *const sctp_conntrack_names[] = {
        "NONE",
        "CLOSED",
        "COOKIE_WAIT",
@@ -133,7 +133,8 @@ static const u8 sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = {
 static bool sctp_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff,
                              struct nf_conntrack_tuple *tuple)
 {
-       sctp_sctphdr_t _hdr, *hp;
+       const struct sctphdr *hp;
+       struct sctphdr _hdr;
 
        /* Actually only need first 8 bytes. */
        hp = skb_header_pointer(skb, dataoff, 8, &_hdr);
@@ -291,8 +292,10 @@ static int sctp_packet(struct nf_conn *ct,
 {
        enum sctp_conntrack new_state, old_state;
        enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);
-       sctp_sctphdr_t _sctph, *sh;
-       sctp_chunkhdr_t _sch, *sch;
+       const struct sctphdr *sh;
+       struct sctphdr _sctph;
+       const struct sctp_chunkhdr *sch;
+       struct sctp_chunkhdr _sch;
        u_int32_t offset, count;
        unsigned long map[256 / sizeof(unsigned long)] = { 0 };
 
@@ -393,8 +396,10 @@ static bool sctp_new(struct nf_conn *ct, const struct sk_buff *skb,
                     unsigned int dataoff)
 {
        enum sctp_conntrack new_state;
-       sctp_sctphdr_t _sctph, *sh;
-       sctp_chunkhdr_t _sch, *sch;
+       const struct sctphdr *sh;
+       struct sctphdr _sctph;
+       const struct sctp_chunkhdr *sch;
+       struct sctp_chunkhdr _sch;
        u_int32_t offset, count;
        unsigned long map[256 / sizeof(unsigned long)] = { 0 };