Commit 38ff4fa4 authored by Harvey Harrison's avatar Harvey Harrison Committed by David S. Miller
Browse files

netfilter: replace uses of NIP6_FMT with %p6

parent 1afa67f5
Loading
Loading
Loading
Loading
+8 −12
Original line number Diff line number Diff line
@@ -820,13 +820,11 @@ static int ip_vs_conn_seq_show(struct seq_file *seq, void *v)

#ifdef CONFIG_IP_VS_IPV6
		if (cp->af == AF_INET6)
			seq_printf(seq,
				"%-3s " NIP6_FMT " %04X " NIP6_FMT
				" %04X " NIP6_FMT " %04X %-11s %7lu\n",
			seq_printf(seq, "%-3s %p6 %04X %p6 %04X %p6 %04X %-11s %7lu\n",
				ip_vs_proto_name(cp->protocol),
				NIP6(cp->caddr.in6), ntohs(cp->cport),
				NIP6(cp->vaddr.in6), ntohs(cp->vport),
				NIP6(cp->daddr.in6), ntohs(cp->dport),
				&cp->caddr.in6, ntohs(cp->cport),
				&cp->vaddr.in6, ntohs(cp->vport),
				&cp->daddr.in6, ntohs(cp->dport),
				ip_vs_state_name(cp->protocol, cp->state),
				(cp->timer.expires-jiffies)/HZ);
		else
@@ -883,13 +881,11 @@ static int ip_vs_conn_sync_seq_show(struct seq_file *seq, void *v)

#ifdef CONFIG_IP_VS_IPV6
		if (cp->af == AF_INET6)
			seq_printf(seq,
				"%-3s " NIP6_FMT " %04X " NIP6_FMT
				" %04X " NIP6_FMT " %04X %-11s %-6s %7lu\n",
			seq_printf(seq, "%-3s %p6 %04X %p6 %04X %p6 %04X %-11s %-6s %7lu\n",
				ip_vs_proto_name(cp->protocol),
				NIP6(cp->caddr.in6), ntohs(cp->cport),
				NIP6(cp->vaddr.in6), ntohs(cp->vport),
				NIP6(cp->daddr.in6), ntohs(cp->dport),
				&cp->caddr.in6, ntohs(cp->cport),
				&cp->vaddr.in6, ntohs(cp->vport),
				&cp->daddr.in6, ntohs(cp->dport),
				ip_vs_state_name(cp->protocol, cp->state),
				ip_vs_origin_name(cp->flags),
				(cp->timer.expires-jiffies)/HZ);
+4 −4
Original line number Diff line number Diff line
@@ -805,9 +805,9 @@ static int ip_vs_out_icmp_v6(struct sk_buff *skb, int *related)
	if (ic == NULL)
		return NF_DROP;

	IP_VS_DBG(12, "Outgoing ICMPv6 (%d,%d) " NIP6_FMT "->" NIP6_FMT "\n",
	IP_VS_DBG(12, "Outgoing ICMPv6 (%d,%d) %p6->%p6\n",
		  ic->icmp6_type, ntohs(icmpv6_id(ic)),
		  NIP6(iph->saddr), NIP6(iph->daddr));
		  &iph->saddr, &iph->daddr);

	/*
	 * Work through seeing if this is for us.
@@ -1175,9 +1175,9 @@ ip_vs_in_icmp_v6(struct sk_buff *skb, int *related, unsigned int hooknum)
	if (ic == NULL)
		return NF_DROP;

	IP_VS_DBG(12, "Incoming ICMPv6 (%d,%d) " NIP6_FMT "->" NIP6_FMT "\n",
	IP_VS_DBG(12, "Incoming ICMPv6 (%d,%d) %p6->%p6\n",
		  ic->icmp6_type, ntohs(icmpv6_id(ic)),
		  NIP6(iph->saddr), NIP6(iph->daddr));
		  &iph->saddr, &iph->daddr);

	/*
	 * Work through seeing if this is for us.
+4 −4
Original line number Diff line number Diff line
@@ -1867,9 +1867,9 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
		if (iter->table == ip_vs_svc_table) {
#ifdef CONFIG_IP_VS_IPV6
			if (svc->af == AF_INET6)
				seq_printf(seq, "%s  [" NIP6_FMT "]:%04X %s ",
				seq_printf(seq, "%s  [%p6]:%04X %s ",
					   ip_vs_proto_name(svc->protocol),
					   NIP6(svc->addr.in6),
					   &svc->addr.in6,
					   ntohs(svc->port),
					   svc->scheduler->name);
			else
@@ -1895,9 +1895,9 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
#ifdef CONFIG_IP_VS_IPV6
			if (dest->af == AF_INET6)
				seq_printf(seq,
					   "  -> [" NIP6_FMT "]:%04X"
					   "  -> [%p6]:%04X"
					   "      %-7s %-6d %-10d %-10d\n",
					   NIP6(dest->addr.in6),
					   &dest->addr.in6,
					   ntohs(dest->port),
					   ip_vs_fwd_name(atomic_read(&dest->conn_flags)),
					   atomic_read(&dest->weight),
+7 −12
Original line number Diff line number Diff line
@@ -203,26 +203,21 @@ ip_vs_tcpudp_debug_packet_v6(struct ip_vs_protocol *pp,
	if (ih == NULL)
		sprintf(buf, "%s TRUNCATED", pp->name);
	else if (ih->nexthdr == IPPROTO_FRAGMENT)
		sprintf(buf, "%s " NIP6_FMT "->" NIP6_FMT " frag",
			pp->name, NIP6(ih->saddr),
			NIP6(ih->daddr));
		sprintf(buf, "%s %p6->%p6 frag",
			pp->name, &ih->saddr, &ih->daddr);
	else {
		__be16 _ports[2], *pptr;

		pptr = skb_header_pointer(skb, offset + sizeof(struct ipv6hdr),
					  sizeof(_ports), _ports);
		if (pptr == NULL)
			sprintf(buf, "%s TRUNCATED " NIP6_FMT "->" NIP6_FMT,
				pp->name,
				NIP6(ih->saddr),
				NIP6(ih->daddr));
			sprintf(buf, "%s TRUNCATED %p6->%p6",
				pp->name, &ih->saddr, &ih->daddr);
		else
			sprintf(buf, "%s " NIP6_FMT ":%u->" NIP6_FMT ":%u",
			sprintf(buf, "%s %p6:%u->%p6:%u",
				pp->name,
				NIP6(ih->saddr),
				ntohs(pptr[0]),
				NIP6(ih->daddr),
				ntohs(pptr[1]));
				&ih->saddr, ntohs(pptr[0]),
				&ih->daddr, ntohs(pptr[1]));
	}

	printk(KERN_DEBUG "IPVS: %s: %s\n", msg, buf);
+2 −3
Original line number Diff line number Diff line
@@ -154,9 +154,8 @@ ah_esp_debug_packet_v6(struct ip_vs_protocol *pp, const struct sk_buff *skb,
	if (ih == NULL)
		sprintf(buf, "%s TRUNCATED", pp->name);
	else
		sprintf(buf, "%s " NIP6_FMT "->" NIP6_FMT,
			pp->name, NIP6(ih->saddr),
			NIP6(ih->daddr));
		sprintf(buf, "%s %p6->%p6",
			pp->name, &ih->saddr, &ih->daddr);

	printk(KERN_DEBUG "IPVS: %s: %s\n", msg, buf);
}
Loading