@@ -129,13 +129,13 @@ static int rpl_do_srh_inline(struct sk_buff *skb, const struct rpl_lwt *rlwt,
129
129
struct dst_entry * cache_dst )
130
130
{
131
131
struct ipv6_rpl_sr_hdr * isrh , * csrh ;
132
- const struct ipv6hdr * oldhdr ;
132
+ struct ipv6hdr oldhdr ;
133
133
struct ipv6hdr * hdr ;
134
134
unsigned char * buf ;
135
135
size_t hdrlen ;
136
136
int err ;
137
137
138
- oldhdr = ipv6_hdr (skb );
138
+ memcpy ( & oldhdr , ipv6_hdr (skb ), sizeof ( oldhdr ) );
139
139
140
140
buf = kcalloc (struct_size (srh , segments .addr , srh -> segments_left ), 2 , GFP_ATOMIC );
141
141
if (!buf )
@@ -147,7 +147,7 @@ static int rpl_do_srh_inline(struct sk_buff *skb, const struct rpl_lwt *rlwt,
147
147
memcpy (isrh , srh , sizeof (* isrh ));
148
148
memcpy (isrh -> rpl_segaddr , & srh -> rpl_segaddr [1 ],
149
149
(srh -> segments_left - 1 ) * 16 );
150
- isrh -> rpl_segaddr [srh -> segments_left - 1 ] = oldhdr -> daddr ;
150
+ isrh -> rpl_segaddr [srh -> segments_left - 1 ] = oldhdr . daddr ;
151
151
152
152
ipv6_rpl_srh_compress (csrh , isrh , & srh -> rpl_segaddr [0 ],
153
153
isrh -> segments_left - 1 );
@@ -169,7 +169,7 @@ static int rpl_do_srh_inline(struct sk_buff *skb, const struct rpl_lwt *rlwt,
169
169
skb_mac_header_rebuild (skb );
170
170
171
171
hdr = ipv6_hdr (skb );
172
- memmove (hdr , oldhdr , sizeof (* hdr ));
172
+ memmove (hdr , & oldhdr , sizeof (* hdr ));
173
173
isrh = (void * )hdr + sizeof (* hdr );
174
174
memcpy (isrh , csrh , hdrlen );
175
175
0 commit comments