diff options
author | Julian Anastasov <ja@ssi.bg> | 2010-10-17 09:46:17 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2010-10-21 05:04:43 -0400 |
commit | 0d79641a96d612aaa6d57a4d4f521d7ed9c9ccdd (patch) | |
tree | 9783497ace4f8ff8eeac24524ecb93012166c60d /include/net | |
parent | 3233759be7eeca9998c514b8f49e8cf2b85e64d3 (diff) |
ipvs: provide address family for debugging
As skb->protocol is not valid in LOCAL_OUT add
parameter for address family in packet debugging functions.
Even if ports are not present in AH and ESP change them to
use ip_vs_tcpudp_debug_packet to show at least valid addresses
as before. This patch removes the last user of skb->protocol
in IPVS.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ip_vs.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 2f88d5942332..b7bbd6c28cfa 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -136,24 +136,24 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len, | |||
136 | if (net_ratelimit()) \ | 136 | if (net_ratelimit()) \ |
137 | printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \ | 137 | printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \ |
138 | } while (0) | 138 | } while (0) |
139 | #define IP_VS_DBG_PKT(level, pp, skb, ofs, msg) \ | 139 | #define IP_VS_DBG_PKT(level, af, pp, skb, ofs, msg) \ |
140 | do { \ | 140 | do { \ |
141 | if (level <= ip_vs_get_debug_level()) \ | 141 | if (level <= ip_vs_get_debug_level()) \ |
142 | pp->debug_packet(pp, skb, ofs, msg); \ | 142 | pp->debug_packet(af, pp, skb, ofs, msg); \ |
143 | } while (0) | 143 | } while (0) |
144 | #define IP_VS_DBG_RL_PKT(level, pp, skb, ofs, msg) \ | 144 | #define IP_VS_DBG_RL_PKT(level, af, pp, skb, ofs, msg) \ |
145 | do { \ | 145 | do { \ |
146 | if (level <= ip_vs_get_debug_level() && \ | 146 | if (level <= ip_vs_get_debug_level() && \ |
147 | net_ratelimit()) \ | 147 | net_ratelimit()) \ |
148 | pp->debug_packet(pp, skb, ofs, msg); \ | 148 | pp->debug_packet(af, pp, skb, ofs, msg); \ |
149 | } while (0) | 149 | } while (0) |
150 | #else /* NO DEBUGGING at ALL */ | 150 | #else /* NO DEBUGGING at ALL */ |
151 | #define IP_VS_DBG_BUF(level, msg...) do {} while (0) | 151 | #define IP_VS_DBG_BUF(level, msg...) do {} while (0) |
152 | #define IP_VS_ERR_BUF(msg...) do {} while (0) | 152 | #define IP_VS_ERR_BUF(msg...) do {} while (0) |
153 | #define IP_VS_DBG(level, msg...) do {} while (0) | 153 | #define IP_VS_DBG(level, msg...) do {} while (0) |
154 | #define IP_VS_DBG_RL(msg...) do {} while (0) | 154 | #define IP_VS_DBG_RL(msg...) do {} while (0) |
155 | #define IP_VS_DBG_PKT(level, pp, skb, ofs, msg) do {} while (0) | 155 | #define IP_VS_DBG_PKT(level, af, pp, skb, ofs, msg) do {} while (0) |
156 | #define IP_VS_DBG_RL_PKT(level, pp, skb, ofs, msg) do {} while (0) | 156 | #define IP_VS_DBG_RL_PKT(level, af, pp, skb, ofs, msg) do {} while (0) |
157 | #endif | 157 | #endif |
158 | 158 | ||
159 | #define IP_VS_BUG() BUG() | 159 | #define IP_VS_BUG() BUG() |
@@ -345,7 +345,7 @@ struct ip_vs_protocol { | |||
345 | 345 | ||
346 | int (*app_conn_bind)(struct ip_vs_conn *cp); | 346 | int (*app_conn_bind)(struct ip_vs_conn *cp); |
347 | 347 | ||
348 | void (*debug_packet)(struct ip_vs_protocol *pp, | 348 | void (*debug_packet)(int af, struct ip_vs_protocol *pp, |
349 | const struct sk_buff *skb, | 349 | const struct sk_buff *skb, |
350 | int offset, | 350 | int offset, |
351 | const char *msg); | 351 | const char *msg); |
@@ -828,7 +828,8 @@ extern int | |||
828 | ip_vs_set_state_timeout(int *table, int num, const char *const *names, | 828 | ip_vs_set_state_timeout(int *table, int num, const char *const *names, |
829 | const char *name, int to); | 829 | const char *name, int to); |
830 | extern void | 830 | extern void |
831 | ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp, const struct sk_buff *skb, | 831 | ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp, |
832 | const struct sk_buff *skb, | ||
832 | int offset, const char *msg); | 833 | int offset, const char *msg); |
833 | 834 | ||
834 | extern struct ip_vs_protocol ip_vs_protocol_tcp; | 835 | extern struct ip_vs_protocol ip_vs_protocol_tcp; |