]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - net/dccp/ipv6.c
inet: constify ip headers and in6_addr
[thirdparty/kernel/stable.git] / net / dccp / ipv6.c
index de1b7e37ad5b7fdb4431988e1f1e212fc0bd71a9..73add237324799d13a8ceca58dc385e5633e6e4c 100644 (file)
@@ -54,8 +54,8 @@ static void dccp_v6_hash(struct sock *sk)
 
 /* add pseudo-header to DCCP checksum stored in skb->csum */
 static inline __sum16 dccp_v6_csum_finish(struct sk_buff *skb,
-                                     struct in6_addr *saddr,
-                                     struct in6_addr *daddr)
+                                     const struct in6_addr *saddr,
+                                     const struct in6_addr *daddr)
 {
        return csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_DCCP, skb->csum);
 }
@@ -87,7 +87,7 @@ static inline __u32 dccp_v6_init_sequence(struct sk_buff *skb)
 static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                        u8 type, u8 code, int offset, __be32 info)
 {
-       struct ipv6hdr *hdr = (struct ipv6hdr *)skb->data;
+       const struct ipv6hdr *hdr = (const struct ipv6hdr *)skb->data;
        const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + offset);
        struct dccp_sock *dp;
        struct ipv6_pinfo *np;
@@ -296,7 +296,7 @@ static void dccp_v6_reqsk_destructor(struct request_sock *req)
 
 static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
 {
-       struct ipv6hdr *rxip6h;
+       const struct ipv6hdr *rxip6h;
        struct sk_buff *skb;
        struct flowi6 fl6;
        struct net *net = dev_net(skb_dst(rxskb)->dev);