diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-15 02:49:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:02:42 -0500 |
commit | c71e9167081a6a0d2a076cda674b696b89bb31c2 (patch) | |
tree | d10434bc658ba40a51a76ab6916154d2d8d73331 /net/ipv4 | |
parent | c56cc9c07b049acc9d2ca97be0b540978c0c80bf (diff) |
[NETFILTER]: nf_conntrack: make print_conntrack function optional for l4protos
Allows to remove five empty implementations.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c index acde9952cadf..543c02b74c96 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | |||
@@ -121,7 +121,7 @@ static int ct_seq_show(struct seq_file *s, void *v) | |||
121 | ? (long)(ct->timeout.expires - jiffies)/HZ : 0) != 0) | 121 | ? (long)(ct->timeout.expires - jiffies)/HZ : 0) != 0) |
122 | return -ENOSPC; | 122 | return -ENOSPC; |
123 | 123 | ||
124 | if (l4proto->print_conntrack(s, ct)) | 124 | if (l4proto->print_conntrack && l4proto->print_conntrack(s, ct)) |
125 | return -ENOSPC; | 125 | return -ENOSPC; |
126 | 126 | ||
127 | if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, | 127 | if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, |
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index cd0d6690627e..4004a04c5510 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c | |||
@@ -74,13 +74,6 @@ static int icmp_print_tuple(struct seq_file *s, | |||
74 | ntohs(tuple->src.u.icmp.id)); | 74 | ntohs(tuple->src.u.icmp.id)); |
75 | } | 75 | } |
76 | 76 | ||
77 | /* Print out the private part of the conntrack. */ | ||
78 | static int icmp_print_conntrack(struct seq_file *s, | ||
79 | const struct nf_conn *conntrack) | ||
80 | { | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | /* Returns verdict for packet, or -1 for invalid. */ | 77 | /* Returns verdict for packet, or -1 for invalid. */ |
85 | static int icmp_packet(struct nf_conn *ct, | 78 | static int icmp_packet(struct nf_conn *ct, |
86 | const struct sk_buff *skb, | 79 | const struct sk_buff *skb, |
@@ -309,7 +302,6 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp __read_mostly = | |||
309 | .pkt_to_tuple = icmp_pkt_to_tuple, | 302 | .pkt_to_tuple = icmp_pkt_to_tuple, |
310 | .invert_tuple = icmp_invert_tuple, | 303 | .invert_tuple = icmp_invert_tuple, |
311 | .print_tuple = icmp_print_tuple, | 304 | .print_tuple = icmp_print_tuple, |
312 | .print_conntrack = icmp_print_conntrack, | ||
313 | .packet = icmp_packet, | 305 | .packet = icmp_packet, |
314 | .new = icmp_new, | 306 | .new = icmp_new, |
315 | .error = icmp_error, | 307 | .error = icmp_error, |