aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/netfilter/nf_nat_proto_gre.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_gre.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c
index b887ebb42133..a1e4da16da2e 100644
--- a/net/ipv4/netfilter/nf_nat_proto_gre.c
+++ b/net/ipv4/netfilter/nf_nat_proto_gre.c
@@ -104,7 +104,7 @@ gre_manip_pkt(struct sk_buff *skb, unsigned int iphdroff,
104{ 104{
105 struct gre_hdr *greh; 105 struct gre_hdr *greh;
106 struct gre_hdr_pptp *pgreh; 106 struct gre_hdr_pptp *pgreh;
107 struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff); 107 const struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff);
108 unsigned int hdroff = iphdroff + iph->ihl * 4; 108 unsigned int hdroff = iphdroff + iph->ihl * 4;
109 109
110 /* pgreh includes two optional 32bit fields which are not required 110 /* pgreh includes two optional 32bit fields which are not required
diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c
index 4a185f6aa65a..e10024a1b666 100644
--- a/net/netfilter/nf_conntrack_proto_gre.c
+++ b/net/netfilter/nf_conntrack_proto_gre.c
@@ -161,9 +161,11 @@ static int gre_pkt_to_tuple(const struct sk_buff *skb,
161 unsigned int dataoff, 161 unsigned int dataoff,
162 struct nf_conntrack_tuple *tuple) 162 struct nf_conntrack_tuple *tuple)
163{ 163{
164 struct gre_hdr_pptp _pgrehdr, *pgrehdr; 164 const struct gre_hdr_pptp *pgrehdr;
165 struct gre_hdr_pptp _pgrehdr;
165 __be16 srckey; 166 __be16 srckey;
166 struct gre_hdr _grehdr, *grehdr; 167 const struct gre_hdr *grehdr;
168 struct gre_hdr _grehdr;
167 169
168 /* first only delinearize old RFC1701 GRE header */ 170 /* first only delinearize old RFC1701 GRE header */
169 grehdr = skb_header_pointer(skb, dataoff, sizeof(_grehdr), &_grehdr); 171 grehdr = skb_header_pointer(skb, dataoff, sizeof(_grehdr), &_grehdr);