]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: nf_conntrack: const annotations in nf_conntrack_sctp, nf_nat_proto_gre
authorJan Engelhardt <jengelh@computergmbh.de>
Mon, 14 Apr 2008 09:15:54 +0000 (11:15 +0200)
committerPatrick McHardy <kaber@trash.net>
Mon, 14 Apr 2008 09:15:54 +0000 (11:15 +0200)
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv4/netfilter/nf_nat_proto_dccp.c
net/ipv4/netfilter/nf_nat_proto_gre.c
net/netfilter/nf_conntrack_proto_sctp.c

index f78eb26e9a20655aa2a92cd3904f18e617966b1e..22485ce306d41f2d175786bdc9fc7f20160306e2 100644 (file)
@@ -38,7 +38,7 @@ dccp_manip_pkt(struct sk_buff *skb,
               const struct nf_conntrack_tuple *tuple,
               enum nf_nat_manip_type maniptype)
 {
-       struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff);
+       const struct iphdr *iph = (const void *)(skb->data + iphdroff);
        struct dccp_hdr *hdr;
        unsigned int hdroff = iphdroff + iph->ihl * 4;
        __be32 oldip, newip;
index 4c4af5a6d6c8a82045a88208128fc1bd6a2bf722..d7e89201351e90d01bbbac1666e913f90e036dbf 100644 (file)
@@ -84,7 +84,7 @@ gre_manip_pkt(struct sk_buff *skb, unsigned int iphdroff,
              const struct nf_conntrack_tuple *tuple,
              enum nf_nat_manip_type maniptype)
 {
-       struct gre_hdr *greh;
+       const struct gre_hdr *greh;
        struct gre_hdr_pptp *pgreh;
        const struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff);
        unsigned int hdroff = iphdroff + iph->ihl * 4;
index 2d47351f70dcc7212531e6f2823bac7cdb4c522b..cbf2e27a22b298c0d3d818b3b1e85f398b259984 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 };