diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-10-31 03:54:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 03:54:56 -0400 |
commit | 21454aaad30651ba0dcc16fe5271bc12ee21f132 (patch) | |
tree | eb525494d6f80a0e855840bc588ae1f422348b04 /net/bridge | |
parent | 14d5e834f6b36667c7da56374645f99b6cf30814 (diff) |
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>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/netfilter/ebt_log.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c index 5e7cff3542f2..d44cbf8c374a 100644 --- a/net/bridge/netfilter/ebt_log.c +++ b/net/bridge/netfilter/ebt_log.c | |||
@@ -79,7 +79,6 @@ print_ports(const struct sk_buff *skb, uint8_t protocol, int offset) | |||
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | #define myNIPQUAD(a) a[0], a[1], a[2], a[3] | ||
83 | static void | 82 | static void |
84 | ebt_log_packet(u_int8_t pf, unsigned int hooknum, | 83 | ebt_log_packet(u_int8_t pf, unsigned int hooknum, |
85 | const struct sk_buff *skb, const struct net_device *in, | 84 | const struct sk_buff *skb, const struct net_device *in, |
@@ -113,9 +112,8 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum, | |||
113 | printk(" INCOMPLETE IP header"); | 112 | printk(" INCOMPLETE IP header"); |
114 | goto out; | 113 | goto out; |
115 | } | 114 | } |
116 | printk(" IP SRC=%u.%u.%u.%u IP DST=%u.%u.%u.%u, IP " | 115 | printk(" IP SRC=%pI4 IP DST=%pI4, IP tos=0x%02X, IP proto=%d", |
117 | "tos=0x%02X, IP proto=%d", NIPQUAD(ih->saddr), | 116 | &ih->saddr, &ih->daddr, ih->tos, ih->protocol); |
118 | NIPQUAD(ih->daddr), ih->tos, ih->protocol); | ||
119 | print_ports(skb, ih->protocol, ih->ihl*4); | 117 | print_ports(skb, ih->protocol, ih->ihl*4); |
120 | goto out; | 118 | goto out; |
121 | } | 119 | } |
@@ -175,12 +173,10 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum, | |||
175 | } | 173 | } |
176 | printk(" ARP MAC SRC="); | 174 | printk(" ARP MAC SRC="); |
177 | print_MAC(ap->mac_src); | 175 | print_MAC(ap->mac_src); |
178 | printk(" ARP IP SRC=%u.%u.%u.%u", | 176 | printk(" ARP IP SRC=%pI4", ap->ip_src); |
179 | myNIPQUAD(ap->ip_src)); | ||
180 | printk(" ARP MAC DST="); | 177 | printk(" ARP MAC DST="); |
181 | print_MAC(ap->mac_dst); | 178 | print_MAC(ap->mac_dst); |
182 | printk(" ARP IP DST=%u.%u.%u.%u", | 179 | printk(" ARP IP DST=%pI4", ap->ip_dst); |
183 | myNIPQUAD(ap->ip_dst)); | ||
184 | } | 180 | } |
185 | } | 181 | } |
186 | out: | 182 | out: |