get_ct as is and will not update its skb argument, and users of nfnl_ct_hook is currently only nfqueue, we can add const qualifier.
Unified · Split
| @@ -378,7 +378,7 @@ enum ip_conntrack_info; · 377 unmodified lines | |||
| 378 | struct nlattr; | 378 | struct nlattr; |
| 379 | 379 | ||
| 380 | struct nfnl_ct_hook { | 380 | struct nfnl_ct_hook { |
| 381 | struct nf_conn *(*get_ct)(struct sk_buff *skb, | 381 | struct nf_conn *(*get_ct)(const struct sk_buff *skb, |
| 382 | enum ip_conntrack_info *ctinfo); | 382 | enum ip_conntrack_info *ctinfo); |
| 383 | size_t (*build_size)(const struct nf_conn *ct); | 383 | size_t (*build_size)(const struct nf_conn *ct); |
| 384 | int (*build)(struct sk_buff *skb, struct nf_conn *ct, | 384 | int (*build)(struct sk_buff *skb, struct nf_conn *ct, |
| @@ -2162,7 +2162,7 @@ ctnetlink_glue_build_size(const struct nf_conn *ct) · 2161 unmodified lines | |||
| 2162 | ; | 2162 | ; |
| 2163 | } | 2163 | } |
| 2164 | 2164 | ||
| 2165 | static struct nf_conn *ctnetlink_glue_get_ct(struct sk_buff *skb, | 2165 | static struct nf_conn *ctnetlink_glue_get_ct(const struct sk_buff *skb, |
| 2166 | enum ip_conntrack_info *ctinfo) | 2166 | enum ip_conntrack_info *ctinfo) |
| 2167 | { | 2167 | { |
| 2168 | struct nf_conn *ct; | 2168 | struct nf_conn *ct; |