net: replace NIPQUAD() in net/*/
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
14d5e834f6
commit
21454aaad3
@@ -79,7 +79,6 @@ print_ports(const struct sk_buff *skb, uint8_t protocol, int offset)
|
||||
}
|
||||
}
|
||||
|
||||
#define myNIPQUAD(a) a[0], a[1], a[2], a[3]
|
||||
static void
|
||||
ebt_log_packet(u_int8_t pf, unsigned int hooknum,
|
||||
const struct sk_buff *skb, const struct net_device *in,
|
||||
@@ -113,9 +112,8 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
|
||||
printk(" INCOMPLETE IP header");
|
||||
goto out;
|
||||
}
|
||||
printk(" IP SRC=%u.%u.%u.%u IP DST=%u.%u.%u.%u, IP "
|
||||
"tos=0x%02X, IP proto=%d", NIPQUAD(ih->saddr),
|
||||
NIPQUAD(ih->daddr), ih->tos, ih->protocol);
|
||||
printk(" IP SRC=%pI4 IP DST=%pI4, IP tos=0x%02X, IP proto=%d",
|
||||
&ih->saddr, &ih->daddr, ih->tos, ih->protocol);
|
||||
print_ports(skb, ih->protocol, ih->ihl*4);
|
||||
goto out;
|
||||
}
|
||||
@@ -175,12 +173,10 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
|
||||
}
|
||||
printk(" ARP MAC SRC=");
|
||||
print_MAC(ap->mac_src);
|
||||
printk(" ARP IP SRC=%u.%u.%u.%u",
|
||||
myNIPQUAD(ap->ip_src));
|
||||
printk(" ARP IP SRC=%pI4", ap->ip_src);
|
||||
printk(" ARP MAC DST=");
|
||||
print_MAC(ap->mac_dst);
|
||||
printk(" ARP IP DST=%u.%u.%u.%u",
|
||||
myNIPQUAD(ap->ip_dst));
|
||||
printk(" ARP IP DST=%pI4", ap->ip_dst);
|
||||
}
|
||||
}
|
||||
out:
|
||||
|
Reference in New Issue
Block a user