aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/nf_nat_proto_dccp.c2
-rw-r--r--net/ipv4/netfilter/nf_nat_proto_gre.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/nf_nat_proto_dccp.c b/net/ipv4/netfilter/nf_nat_proto_dccp.c
index f78eb26e9a20..22485ce306d4 100644
--- a/net/ipv4/netfilter/nf_nat_proto_dccp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_dccp.c
@@ -38,7 +38,7 @@ dccp_manip_pkt(struct sk_buff *skb,
38 const struct nf_conntrack_tuple *tuple, 38 const struct nf_conntrack_tuple *tuple,
39 enum nf_nat_manip_type maniptype) 39 enum nf_nat_manip_type maniptype)
40{ 40{
41 struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff); 41 const struct iphdr *iph = (const void *)(skb->data + iphdroff);
42 struct dccp_hdr *hdr; 42 struct dccp_hdr *hdr;
43 unsigned int hdroff = iphdroff + iph->ihl * 4; 43 unsigned int hdroff = iphdroff + iph->ihl * 4;
44 __be32 oldip, newip; 44 __be32 oldip, newip;
diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c
index 4c4af5a6d6c8..d7e89201351e 100644
--- a/net/ipv4/netfilter/nf_nat_proto_gre.c
+++ b/net/ipv4/netfilter/nf_nat_proto_gre.c
@@ -84,7 +84,7 @@ gre_manip_pkt(struct sk_buff *skb, unsigned int iphdroff,
84 const struct nf_conntrack_tuple *tuple, 84 const struct nf_conntrack_tuple *tuple,
85 enum nf_nat_manip_type maniptype) 85 enum nf_nat_manip_type maniptype)
86{ 86{
87 struct gre_hdr *greh; 87 const struct gre_hdr *greh;
88 struct gre_hdr_pptp *pgreh; 88 struct gre_hdr_pptp *pgreh;
89 const struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff); 89 const struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff);
90 unsigned int hdroff = iphdroff + iph->ihl * 4; 90 unsigned int hdroff = iphdroff + iph->ihl * 4;