[NETFILTER]: nf_{conntrack,nat}_proto_gre: annotate with const
authorJan Engelhardt <jengelh@computergmbh.de>
Thu, 31 Jan 2008 12:52:46 +0000 (04:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2008 03:28:12 +0000 (19:28 -0800)
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/nf_nat_proto_gre.c
net/netfilter/nf_conntrack_proto_gre.c

index b887ebb42133a2068f70f203025944d63ea2aabe..a1e4da16da2e8a411fc39b6009c4b4f1151d0a09 100644 (file)
@@ -104,7 +104,7 @@ gre_manip_pkt(struct sk_buff *skb, unsigned int iphdroff,
 {
        struct gre_hdr *greh;
        struct gre_hdr_pptp *pgreh;
-       struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff);
+       const struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff);
        unsigned int hdroff = iphdroff + iph->ihl * 4;
 
        /* pgreh includes two optional 32bit fields which are not required
index 4a185f6aa65a907235c7ac7c2ae9629aa37c242a..e10024a1b6662e971ac565639d10c1bd16a85793 100644 (file)
@@ -161,9 +161,11 @@ static int gre_pkt_to_tuple(const struct sk_buff *skb,
                           unsigned int dataoff,
                           struct nf_conntrack_tuple *tuple)
 {
-       struct gre_hdr_pptp _pgrehdr, *pgrehdr;
+       const struct gre_hdr_pptp *pgrehdr;
+       struct gre_hdr_pptp _pgrehdr;
        __be16 srckey;
-       struct gre_hdr _grehdr, *grehdr;
+       const struct gre_hdr *grehdr;
+       struct gre_hdr _grehdr;
 
        /* first only delinearize old RFC1701 GRE header */
        grehdr = skb_header_pointer(skb, dataoff, sizeof(_grehdr), &_grehdr);