mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
sctp: Allow regular C expression in 4th argument for SCTP_DEBUG_PRINTK_IPADDR macro.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b1364104e3
commit
3ced2dddf1
1 changed files with 5 additions and 4 deletions
|
@ -285,20 +285,21 @@ do { \
|
|||
pr_cont(fmt, ##args); \
|
||||
} while (0)
|
||||
#define SCTP_DEBUG_PRINTK_IPADDR(fmt_lead, fmt_trail, \
|
||||
args_lead, saddr, args_trail...) \
|
||||
args_lead, addr, args_trail...) \
|
||||
do { \
|
||||
const union sctp_addr *_addr = (addr); \
|
||||
if (sctp_debug_flag) { \
|
||||
if (saddr->sa.sa_family == AF_INET6) { \
|
||||
if (_addr->sa.sa_family == AF_INET6) { \
|
||||
printk(KERN_DEBUG \
|
||||
pr_fmt(fmt_lead "%pI6" fmt_trail), \
|
||||
args_lead, \
|
||||
&saddr->v6.sin6_addr, \
|
||||
&_addr->v6.sin6_addr, \
|
||||
args_trail); \
|
||||
} else { \
|
||||
printk(KERN_DEBUG \
|
||||
pr_fmt(fmt_lead "%pI4" fmt_trail), \
|
||||
args_lead, \
|
||||
&saddr->v4.sin_addr.s_addr, \
|
||||
&_addr->v4.sin_addr.s_addr, \
|
||||
args_trail); \
|
||||
} \
|
||||
} \
|
||||
|
|
Loading…
Reference in a new issue