Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ced2ddd authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller
Browse files

sctp: Allow regular C expression in 4th argument for SCTP_DEBUG_PRINTK_IPADDR macro.

parent b1364104
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -285,20 +285,21 @@ do { \
		pr_cont(fmt, ##args);			\
		pr_cont(fmt, ##args);			\
} while (0)
} while (0)
#define SCTP_DEBUG_PRINTK_IPADDR(fmt_lead, fmt_trail,			\
#define SCTP_DEBUG_PRINTK_IPADDR(fmt_lead, fmt_trail,			\
				 args_lead, saddr, args_trail...)	\
				 args_lead, addr, args_trail...)	\
do {									\
do {									\
	const union sctp_addr *_addr = (addr);				\
	if (sctp_debug_flag) {						\
	if (sctp_debug_flag) {						\
		if (saddr->sa.sa_family == AF_INET6) {			\
		if (_addr->sa.sa_family == AF_INET6) {			\
			printk(KERN_DEBUG				\
			printk(KERN_DEBUG				\
			       pr_fmt(fmt_lead "%pI6" fmt_trail),	\
			       pr_fmt(fmt_lead "%pI6" fmt_trail),	\
			       args_lead,				\
			       args_lead,				\
			       &saddr->v6.sin6_addr,			\
			       &_addr->v6.sin6_addr,			\
			       args_trail);				\
			       args_trail);				\
		} else {						\
		} else {						\
			printk(KERN_DEBUG				\
			printk(KERN_DEBUG				\
			       pr_fmt(fmt_lead "%pI4" fmt_trail),	\
			       pr_fmt(fmt_lead "%pI4" fmt_trail),	\
			       args_lead,				\
			       args_lead,				\
			       &saddr->v4.sin_addr.s_addr,		\
			       &_addr->v4.sin_addr.s_addr,		\
			       args_trail);				\
			       args_trail);				\
		}							\
		}							\
	}								\
	}								\