diff options
author | Joe Perches <joe@perches.com> | 2014-09-29 19:08:22 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-11-05 14:10:33 -0500 |
commit | 824f1fbee7bbbd850cdb62d3f95143fad4719e20 (patch) | |
tree | 7e85d243366f4e760b548aa29f7a901f976f44bb | |
parent | 37246a583715e2258d7c5cfecbd9fff0f9fa4b5d (diff) |
netfilter: Convert print_tuple functions to return void
Since adding a new function to seq_file (seq_has_overflowed())
there isn't any value for functions called from seq_show to
return anything. Remove the int returns of the various
print_tuple/<foo>_print_tuple functions.
Link: http://lkml.kernel.org/p/f2e8cf8df433a197daa62cbaf124c900c708edc7.1412031505.git.joe@perches.com
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@vger.kernel.org
Cc: coreteam@netfilter.org
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | include/net/netfilter/nf_conntrack_core.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_l3proto.h | 4 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_l4proto.h | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 6 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | 12 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 10 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 6 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_l3proto_generic.c | 5 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_dccp.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_generic.c | 5 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_gre.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_sctp.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_tcp.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_udp.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_udplite.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_standalone.c | 15 |
17 files changed, 70 insertions, 69 deletions
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h index cc0c18827602..f2f0fa3bb150 100644 --- a/include/net/netfilter/nf_conntrack_core.h +++ b/include/net/netfilter/nf_conntrack_core.h | |||
@@ -72,7 +72,7 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb) | |||
72 | return ret; | 72 | return ret; |
73 | } | 73 | } |
74 | 74 | ||
75 | int | 75 | void |
76 | print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, | 76 | print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, |
77 | const struct nf_conntrack_l3proto *l3proto, | 77 | const struct nf_conntrack_l3proto *l3proto, |
78 | const struct nf_conntrack_l4proto *proto); | 78 | const struct nf_conntrack_l4proto *proto); |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index adc1fa3dd7ab..cdc920b4c4c2 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -38,8 +38,8 @@ struct nf_conntrack_l3proto { | |||
38 | const struct nf_conntrack_tuple *orig); | 38 | const struct nf_conntrack_tuple *orig); |
39 | 39 | ||
40 | /* Print out the per-protocol part of the tuple. */ | 40 | /* Print out the per-protocol part of the tuple. */ |
41 | int (*print_tuple)(struct seq_file *s, | 41 | void (*print_tuple)(struct seq_file *s, |
42 | const struct nf_conntrack_tuple *); | 42 | const struct nf_conntrack_tuple *); |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Called before tracking. | 45 | * Called before tracking. |
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index 82e4ec002a39..1f7061313d54 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h | |||
@@ -56,8 +56,8 @@ struct nf_conntrack_l4proto { | |||
56 | u_int8_t pf, unsigned int hooknum); | 56 | u_int8_t pf, unsigned int hooknum); |
57 | 57 | ||
58 | /* Print out the per-protocol part of the tuple. Return like seq_* */ | 58 | /* Print out the per-protocol part of the tuple. Return like seq_* */ |
59 | int (*print_tuple)(struct seq_file *s, | 59 | void (*print_tuple)(struct seq_file *s, |
60 | const struct nf_conntrack_tuple *); | 60 | const struct nf_conntrack_tuple *); |
61 | 61 | ||
62 | /* Print out the private part of the conntrack. */ | 62 | /* Print out the private part of the conntrack. */ |
63 | void (*print_conntrack)(struct seq_file *s, struct nf_conn *); | 63 | void (*print_conntrack)(struct seq_file *s, struct nf_conn *); |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index a054fe083431..5c61328b7704 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | |||
@@ -56,11 +56,11 @@ static bool ipv4_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
56 | return true; | 56 | return true; |
57 | } | 57 | } |
58 | 58 | ||
59 | static int ipv4_print_tuple(struct seq_file *s, | 59 | static void ipv4_print_tuple(struct seq_file *s, |
60 | const struct nf_conntrack_tuple *tuple) | 60 | const struct nf_conntrack_tuple *tuple) |
61 | { | 61 | { |
62 | return seq_printf(s, "src=%pI4 dst=%pI4 ", | 62 | seq_printf(s, "src=%pI4 dst=%pI4 ", |
63 | &tuple->src.u3.ip, &tuple->dst.u3.ip); | 63 | &tuple->src.u3.ip, &tuple->dst.u3.ip); |
64 | } | 64 | } |
65 | 65 | ||
66 | static int ipv4_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, | 66 | static int ipv4_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c index 91f207c2cb69..d927f9e72130 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | |||
@@ -153,8 +153,10 @@ static int ct_seq_show(struct seq_file *s, void *v) | |||
153 | if (seq_has_overflowed(s)) | 153 | if (seq_has_overflowed(s)) |
154 | goto release; | 154 | goto release; |
155 | 155 | ||
156 | if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, | 156 | print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, |
157 | l3proto, l4proto)) | 157 | l3proto, l4proto); |
158 | |||
159 | if (seq_has_overflowed(s)) | ||
158 | goto release; | 160 | goto release; |
159 | 161 | ||
160 | if (seq_print_acct(s, ct, IP_CT_DIR_ORIGINAL)) | 162 | if (seq_print_acct(s, ct, IP_CT_DIR_ORIGINAL)) |
@@ -164,8 +166,10 @@ static int ct_seq_show(struct seq_file *s, void *v) | |||
164 | if (seq_printf(s, "[UNREPLIED] ")) | 166 | if (seq_printf(s, "[UNREPLIED] ")) |
165 | goto release; | 167 | goto release; |
166 | 168 | ||
167 | if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_REPLY].tuple, | 169 | print_tuple(s, &ct->tuplehash[IP_CT_DIR_REPLY].tuple, |
168 | l3proto, l4proto)) | 170 | l3proto, l4proto); |
171 | |||
172 | if (seq_has_overflowed(s)) | ||
169 | goto release; | 173 | goto release; |
170 | 174 | ||
171 | if (seq_print_acct(s, ct, IP_CT_DIR_REPLY)) | 175 | if (seq_print_acct(s, ct, IP_CT_DIR_REPLY)) |
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index b91b2641adda..80d5554b9a88 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c | |||
@@ -72,13 +72,13 @@ static bool icmp_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
72 | } | 72 | } |
73 | 73 | ||
74 | /* Print out the per-protocol part of the tuple. */ | 74 | /* Print out the per-protocol part of the tuple. */ |
75 | static int icmp_print_tuple(struct seq_file *s, | 75 | static void icmp_print_tuple(struct seq_file *s, |
76 | const struct nf_conntrack_tuple *tuple) | 76 | const struct nf_conntrack_tuple *tuple) |
77 | { | 77 | { |
78 | return seq_printf(s, "type=%u code=%u id=%u ", | 78 | seq_printf(s, "type=%u code=%u id=%u ", |
79 | tuple->dst.u.icmp.type, | 79 | tuple->dst.u.icmp.type, |
80 | tuple->dst.u.icmp.code, | 80 | tuple->dst.u.icmp.code, |
81 | ntohs(tuple->src.u.icmp.id)); | 81 | ntohs(tuple->src.u.icmp.id)); |
82 | } | 82 | } |
83 | 83 | ||
84 | static unsigned int *icmp_get_timeouts(struct net *net) | 84 | static unsigned int *icmp_get_timeouts(struct net *net) |
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c index 4cbc6b290dd5..b68d0e59c1f8 100644 --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | |||
@@ -60,11 +60,11 @@ static bool ipv6_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
60 | return true; | 60 | return true; |
61 | } | 61 | } |
62 | 62 | ||
63 | static int ipv6_print_tuple(struct seq_file *s, | 63 | static void ipv6_print_tuple(struct seq_file *s, |
64 | const struct nf_conntrack_tuple *tuple) | 64 | const struct nf_conntrack_tuple *tuple) |
65 | { | 65 | { |
66 | return seq_printf(s, "src=%pI6 dst=%pI6 ", | 66 | seq_printf(s, "src=%pI6 dst=%pI6 ", |
67 | tuple->src.u3.ip6, tuple->dst.u3.ip6); | 67 | tuple->src.u3.ip6, tuple->dst.u3.ip6); |
68 | } | 68 | } |
69 | 69 | ||
70 | static int ipv6_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, | 70 | static int ipv6_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, |
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index b3807c5cb888..90388d606483 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | |||
@@ -84,13 +84,13 @@ static bool icmpv6_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
84 | } | 84 | } |
85 | 85 | ||
86 | /* Print out the per-protocol part of the tuple. */ | 86 | /* Print out the per-protocol part of the tuple. */ |
87 | static int icmpv6_print_tuple(struct seq_file *s, | 87 | static void icmpv6_print_tuple(struct seq_file *s, |
88 | const struct nf_conntrack_tuple *tuple) | 88 | const struct nf_conntrack_tuple *tuple) |
89 | { | 89 | { |
90 | return seq_printf(s, "type=%u code=%u id=%u ", | 90 | seq_printf(s, "type=%u code=%u id=%u ", |
91 | tuple->dst.u.icmp.type, | 91 | tuple->dst.u.icmp.type, |
92 | tuple->dst.u.icmp.code, | 92 | tuple->dst.u.icmp.code, |
93 | ntohs(tuple->src.u.icmp.id)); | 93 | ntohs(tuple->src.u.icmp.id)); |
94 | } | 94 | } |
95 | 95 | ||
96 | static unsigned int *icmpv6_get_timeouts(struct net *net) | 96 | static unsigned int *icmpv6_get_timeouts(struct net *net) |
diff --git a/net/netfilter/nf_conntrack_l3proto_generic.c b/net/netfilter/nf_conntrack_l3proto_generic.c index e7eb807fe07d..cf9ace70bece 100644 --- a/net/netfilter/nf_conntrack_l3proto_generic.c +++ b/net/netfilter/nf_conntrack_l3proto_generic.c | |||
@@ -49,10 +49,9 @@ static bool generic_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
49 | return true; | 49 | return true; |
50 | } | 50 | } |
51 | 51 | ||
52 | static int generic_print_tuple(struct seq_file *s, | 52 | static void generic_print_tuple(struct seq_file *s, |
53 | const struct nf_conntrack_tuple *tuple) | 53 | const struct nf_conntrack_tuple *tuple) |
54 | { | 54 | { |
55 | return 0; | ||
56 | } | 55 | } |
57 | 56 | ||
58 | static int generic_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, | 57 | static int generic_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, |
diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c index 15971177470a..6dd995c7c72b 100644 --- a/net/netfilter/nf_conntrack_proto_dccp.c +++ b/net/netfilter/nf_conntrack_proto_dccp.c | |||
@@ -618,12 +618,12 @@ out_invalid: | |||
618 | return -NF_ACCEPT; | 618 | return -NF_ACCEPT; |
619 | } | 619 | } |
620 | 620 | ||
621 | static int dccp_print_tuple(struct seq_file *s, | 621 | static void dccp_print_tuple(struct seq_file *s, |
622 | const struct nf_conntrack_tuple *tuple) | 622 | const struct nf_conntrack_tuple *tuple) |
623 | { | 623 | { |
624 | return seq_printf(s, "sport=%hu dport=%hu ", | 624 | seq_printf(s, "sport=%hu dport=%hu ", |
625 | ntohs(tuple->src.u.dccp.port), | 625 | ntohs(tuple->src.u.dccp.port), |
626 | ntohs(tuple->dst.u.dccp.port)); | 626 | ntohs(tuple->dst.u.dccp.port)); |
627 | } | 627 | } |
628 | 628 | ||
629 | static void dccp_print_conntrack(struct seq_file *s, struct nf_conn *ct) | 629 | static void dccp_print_conntrack(struct seq_file *s, struct nf_conn *ct) |
diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c index 957c1db66652..60865f110309 100644 --- a/net/netfilter/nf_conntrack_proto_generic.c +++ b/net/netfilter/nf_conntrack_proto_generic.c | |||
@@ -63,10 +63,9 @@ static bool generic_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
63 | } | 63 | } |
64 | 64 | ||
65 | /* Print out the per-protocol part of the tuple. */ | 65 | /* Print out the per-protocol part of the tuple. */ |
66 | static int generic_print_tuple(struct seq_file *s, | 66 | static void generic_print_tuple(struct seq_file *s, |
67 | const struct nf_conntrack_tuple *tuple) | 67 | const struct nf_conntrack_tuple *tuple) |
68 | { | 68 | { |
69 | return 0; | ||
70 | } | 69 | } |
71 | 70 | ||
72 | static unsigned int *generic_get_timeouts(struct net *net) | 71 | static unsigned int *generic_get_timeouts(struct net *net) |
diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c index cba607ada069..7648674f29c3 100644 --- a/net/netfilter/nf_conntrack_proto_gre.c +++ b/net/netfilter/nf_conntrack_proto_gre.c | |||
@@ -226,12 +226,12 @@ static bool gre_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff, | |||
226 | } | 226 | } |
227 | 227 | ||
228 | /* print gre part of tuple */ | 228 | /* print gre part of tuple */ |
229 | static int gre_print_tuple(struct seq_file *s, | 229 | static void gre_print_tuple(struct seq_file *s, |
230 | const struct nf_conntrack_tuple *tuple) | 230 | const struct nf_conntrack_tuple *tuple) |
231 | { | 231 | { |
232 | return seq_printf(s, "srckey=0x%x dstkey=0x%x ", | 232 | seq_printf(s, "srckey=0x%x dstkey=0x%x ", |
233 | ntohs(tuple->src.u.gre.key), | 233 | ntohs(tuple->src.u.gre.key), |
234 | ntohs(tuple->dst.u.gre.key)); | 234 | ntohs(tuple->dst.u.gre.key)); |
235 | } | 235 | } |
236 | 236 | ||
237 | /* print private data for conntrack */ | 237 | /* print private data for conntrack */ |
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c index c61f4cd6407d..b45da90fad32 100644 --- a/net/netfilter/nf_conntrack_proto_sctp.c +++ b/net/netfilter/nf_conntrack_proto_sctp.c | |||
@@ -166,12 +166,12 @@ static bool sctp_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
166 | } | 166 | } |
167 | 167 | ||
168 | /* Print out the per-protocol part of the tuple. */ | 168 | /* Print out the per-protocol part of the tuple. */ |
169 | static int sctp_print_tuple(struct seq_file *s, | 169 | static void sctp_print_tuple(struct seq_file *s, |
170 | const struct nf_conntrack_tuple *tuple) | 170 | const struct nf_conntrack_tuple *tuple) |
171 | { | 171 | { |
172 | return seq_printf(s, "sport=%hu dport=%hu ", | 172 | seq_printf(s, "sport=%hu dport=%hu ", |
173 | ntohs(tuple->src.u.sctp.port), | 173 | ntohs(tuple->src.u.sctp.port), |
174 | ntohs(tuple->dst.u.sctp.port)); | 174 | ntohs(tuple->dst.u.sctp.port)); |
175 | } | 175 | } |
176 | 176 | ||
177 | /* Print out the private part of the conntrack. */ | 177 | /* Print out the private part of the conntrack. */ |
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index 79668fd3db96..36a3ac8ee9f5 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c | |||
@@ -302,12 +302,12 @@ static bool tcp_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
302 | } | 302 | } |
303 | 303 | ||
304 | /* Print out the per-protocol part of the tuple. */ | 304 | /* Print out the per-protocol part of the tuple. */ |
305 | static int tcp_print_tuple(struct seq_file *s, | 305 | static void tcp_print_tuple(struct seq_file *s, |
306 | const struct nf_conntrack_tuple *tuple) | 306 | const struct nf_conntrack_tuple *tuple) |
307 | { | 307 | { |
308 | return seq_printf(s, "sport=%hu dport=%hu ", | 308 | seq_printf(s, "sport=%hu dport=%hu ", |
309 | ntohs(tuple->src.u.tcp.port), | 309 | ntohs(tuple->src.u.tcp.port), |
310 | ntohs(tuple->dst.u.tcp.port)); | 310 | ntohs(tuple->dst.u.tcp.port)); |
311 | } | 311 | } |
312 | 312 | ||
313 | /* Print out the private part of the conntrack. */ | 313 | /* Print out the private part of the conntrack. */ |
diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c index 9d7721cbce4b..6957281ffee5 100644 --- a/net/netfilter/nf_conntrack_proto_udp.c +++ b/net/netfilter/nf_conntrack_proto_udp.c | |||
@@ -63,12 +63,12 @@ static bool udp_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
63 | } | 63 | } |
64 | 64 | ||
65 | /* Print out the per-protocol part of the tuple. */ | 65 | /* Print out the per-protocol part of the tuple. */ |
66 | static int udp_print_tuple(struct seq_file *s, | 66 | static void udp_print_tuple(struct seq_file *s, |
67 | const struct nf_conntrack_tuple *tuple) | 67 | const struct nf_conntrack_tuple *tuple) |
68 | { | 68 | { |
69 | return seq_printf(s, "sport=%hu dport=%hu ", | 69 | seq_printf(s, "sport=%hu dport=%hu ", |
70 | ntohs(tuple->src.u.udp.port), | 70 | ntohs(tuple->src.u.udp.port), |
71 | ntohs(tuple->dst.u.udp.port)); | 71 | ntohs(tuple->dst.u.udp.port)); |
72 | } | 72 | } |
73 | 73 | ||
74 | static unsigned int *udp_get_timeouts(struct net *net) | 74 | static unsigned int *udp_get_timeouts(struct net *net) |
diff --git a/net/netfilter/nf_conntrack_proto_udplite.c b/net/netfilter/nf_conntrack_proto_udplite.c index 2750e6c69f82..c5903d1649f9 100644 --- a/net/netfilter/nf_conntrack_proto_udplite.c +++ b/net/netfilter/nf_conntrack_proto_udplite.c | |||
@@ -71,12 +71,12 @@ static bool udplite_invert_tuple(struct nf_conntrack_tuple *tuple, | |||
71 | } | 71 | } |
72 | 72 | ||
73 | /* Print out the per-protocol part of the tuple. */ | 73 | /* Print out the per-protocol part of the tuple. */ |
74 | static int udplite_print_tuple(struct seq_file *s, | 74 | static void udplite_print_tuple(struct seq_file *s, |
75 | const struct nf_conntrack_tuple *tuple) | 75 | const struct nf_conntrack_tuple *tuple) |
76 | { | 76 | { |
77 | return seq_printf(s, "sport=%hu dport=%hu ", | 77 | seq_printf(s, "sport=%hu dport=%hu ", |
78 | ntohs(tuple->src.u.udp.port), | 78 | ntohs(tuple->src.u.udp.port), |
79 | ntohs(tuple->dst.u.udp.port)); | 79 | ntohs(tuple->dst.u.udp.port)); |
80 | } | 80 | } |
81 | 81 | ||
82 | static unsigned int *udplite_get_timeouts(struct net *net) | 82 | static unsigned int *udplite_get_timeouts(struct net *net) |
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 348aa3602787..23a0dcab21d4 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -36,12 +36,13 @@ | |||
36 | MODULE_LICENSE("GPL"); | 36 | MODULE_LICENSE("GPL"); |
37 | 37 | ||
38 | #ifdef CONFIG_NF_CONNTRACK_PROCFS | 38 | #ifdef CONFIG_NF_CONNTRACK_PROCFS |
39 | int | 39 | void |
40 | print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, | 40 | print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, |
41 | const struct nf_conntrack_l3proto *l3proto, | 41 | const struct nf_conntrack_l3proto *l3proto, |
42 | const struct nf_conntrack_l4proto *l4proto) | 42 | const struct nf_conntrack_l4proto *l4proto) |
43 | { | 43 | { |
44 | return l3proto->print_tuple(s, tuple) || l4proto->print_tuple(s, tuple); | 44 | l3proto->print_tuple(s, tuple); |
45 | l4proto->print_tuple(s, tuple); | ||
45 | } | 46 | } |
46 | EXPORT_SYMBOL_GPL(print_tuple); | 47 | EXPORT_SYMBOL_GPL(print_tuple); |
47 | 48 | ||
@@ -202,9 +203,8 @@ static int ct_seq_show(struct seq_file *s, void *v) | |||
202 | if (l4proto->print_conntrack) | 203 | if (l4proto->print_conntrack) |
203 | l4proto->print_conntrack(s, ct); | 204 | l4proto->print_conntrack(s, ct); |
204 | 205 | ||
205 | if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, | 206 | print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, |
206 | l3proto, l4proto)) | 207 | l3proto, l4proto); |
207 | goto release; | ||
208 | 208 | ||
209 | if (seq_print_acct(s, ct, IP_CT_DIR_ORIGINAL)) | 209 | if (seq_print_acct(s, ct, IP_CT_DIR_ORIGINAL)) |
210 | goto release; | 210 | goto release; |
@@ -213,9 +213,8 @@ static int ct_seq_show(struct seq_file *s, void *v) | |||
213 | if (seq_printf(s, "[UNREPLIED] ")) | 213 | if (seq_printf(s, "[UNREPLIED] ")) |
214 | goto release; | 214 | goto release; |
215 | 215 | ||
216 | if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_REPLY].tuple, | 216 | print_tuple(s, &ct->tuplehash[IP_CT_DIR_REPLY].tuple, |
217 | l3proto, l4proto)) | 217 | l3proto, l4proto); |
218 | goto release; | ||
219 | 218 | ||
220 | if (seq_print_acct(s, ct, IP_CT_DIR_REPLY)) | 219 | if (seq_print_acct(s, ct, IP_CT_DIR_REPLY)) |
221 | goto release; | 220 | goto release; |