Skip to content

Commit

Permalink
netfilter: ctnetlink: add const qualifier to nfnl_hook.get_ct
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
  • Loading branch information
Ken-ichirou MATSUZAWA authored and Pablo Neira Ayuso committed Oct 5, 2015
1 parent 83f3e94 commit 224a059
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/netfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ enum ip_conntrack_info;
struct nlattr;

struct nfnl_ct_hook {
struct nf_conn *(*get_ct)(struct sk_buff *skb,
struct nf_conn *(*get_ct)(const struct sk_buff *skb,
enum ip_conntrack_info *ctinfo);
size_t (*build_size)(const struct nf_conn *ct);
int (*build)(struct sk_buff *skb, struct nf_conn *ct,
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ ctnetlink_glue_build_size(const struct nf_conn *ct)
;
}

static struct nf_conn *ctnetlink_glue_get_ct(struct sk_buff *skb,
static struct nf_conn *ctnetlink_glue_get_ct(const struct sk_buff *skb,
enum ip_conntrack_info *ctinfo)
{
struct nf_conn *ct;
Expand Down

0 comments on commit 224a059

Please sign in to comment.