Skip to content

Commit

Permalink
[NETFILTER]: ctnetlink: Fix dumping of helper name
Browse files Browse the repository at this point in the history
Properly dump the helper name instead of internal kernel data.
Based on patch by Marcus Sundberg <marcus@ingate.com>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 5, 2006
1 parent e7be699 commit a9b305c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions include/linux/netfilter/nfnetlink_conntrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,4 @@ enum ctattr_help {
};
#define CTA_HELP_MAX (__CTA_HELP_MAX - 1)

#define CTA_HELP_MAXNAMESIZE 32

#endif /* _IPCONNTRACK_NETLINK_H */
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ip_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ ctnetlink_dump_helpinfo(struct sk_buff *skb, const struct ip_conntrack *ct)
return 0;

nest_helper = NFA_NEST(skb, CTA_HELP);
NFA_PUT(skb, CTA_HELP_NAME, CTA_HELP_MAXNAMESIZE, &ct->helper->name);
NFA_PUT(skb, CTA_HELP_NAME, strlen(ct->helper->name), ct->helper->name);

if (ct->helper->to_nfattr)
ct->helper->to_nfattr(skb, ct);
Expand Down

0 comments on commit a9b305c

Please sign in to comment.