diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
commit | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch) | |
tree | 454d1842b1833d976da62abcbd5c47521ebe9bd7 /net/ipv6/addrlabel.c | |
parent | 54a696bd07c14d3b1192d03ce7269bc59b45209a (diff) | |
parent | eb56092fc168bf5af199d47af50c0d84a96db898 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
net: Allow dependancies of FDDI & Tokenring to be modular.
igb: Fix build warning when DCA is disabled.
net: Fix warning fallout from recent NAPI interface changes.
gro: Fix potential use after free
sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
sfc: When disabling the NIC, close the device rather than unregistering it
sfc: SFT9001: Add cable diagnostics
sfc: Add support for multiple PHY self-tests
sfc: Merge top-level functions for self-tests
sfc: Clean up PHY mode management in loopback self-test
sfc: Fix unreliable link detection in some loopback modes
sfc: Generate unique names for per-NIC workqueues
802.3ad: use standard ethhdr instead of ad_header
802.3ad: generalize out mac address initializer
802.3ad: initialize ports LACPDU from const initializer
802.3ad: remove typedef around ad_system
802.3ad: turn ports is_individual into a bool
802.3ad: turn ports is_enabled into a bool
802.3ad: make ntt bool
ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
...
Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'net/ipv6/addrlabel.c')
-rw-r--r-- | net/ipv6/addrlabel.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 08909039d87b..6ff73c4c126a 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c | |||
@@ -186,10 +186,8 @@ u32 ipv6_addr_label(struct net *net, | |||
186 | label = p ? p->label : IPV6_ADDR_LABEL_DEFAULT; | 186 | label = p ? p->label : IPV6_ADDR_LABEL_DEFAULT; |
187 | rcu_read_unlock(); | 187 | rcu_read_unlock(); |
188 | 188 | ||
189 | ADDRLABEL(KERN_DEBUG "%s(addr=" NIP6_FMT ", type=%d, ifindex=%d) => %08x\n", | 189 | ADDRLABEL(KERN_DEBUG "%s(addr=%pI6, type=%d, ifindex=%d) => %08x\n", |
190 | __func__, | 190 | __func__, addr, type, ifindex, label); |
191 | NIP6(*addr), type, ifindex, | ||
192 | label); | ||
193 | 191 | ||
194 | return label; | 192 | return label; |
195 | } | 193 | } |
@@ -203,11 +201,8 @@ static struct ip6addrlbl_entry *ip6addrlbl_alloc(struct net *net, | |||
203 | struct ip6addrlbl_entry *newp; | 201 | struct ip6addrlbl_entry *newp; |
204 | int addrtype; | 202 | int addrtype; |
205 | 203 | ||
206 | ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u)\n", | 204 | ADDRLABEL(KERN_DEBUG "%s(prefix=%pI6, prefixlen=%d, ifindex=%d, label=%u)\n", |
207 | __func__, | 205 | __func__, prefix, prefixlen, ifindex, (unsigned int)label); |
208 | NIP6(*prefix), prefixlen, | ||
209 | ifindex, | ||
210 | (unsigned int)label); | ||
211 | 206 | ||
212 | addrtype = ipv6_addr_type(prefix) & (IPV6_ADDR_MAPPED | IPV6_ADDR_COMPATv4 | IPV6_ADDR_LOOPBACK); | 207 | addrtype = ipv6_addr_type(prefix) & (IPV6_ADDR_MAPPED | IPV6_ADDR_COMPATv4 | IPV6_ADDR_LOOPBACK); |
213 | 208 | ||
@@ -294,12 +289,9 @@ static int ip6addrlbl_add(struct net *net, | |||
294 | struct ip6addrlbl_entry *newp; | 289 | struct ip6addrlbl_entry *newp; |
295 | int ret = 0; | 290 | int ret = 0; |
296 | 291 | ||
297 | ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n", | 292 | ADDRLABEL(KERN_DEBUG "%s(prefix=%pI6, prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n", |
298 | __func__, | 293 | __func__, prefix, prefixlen, ifindex, (unsigned int)label, |
299 | NIP6(*prefix), prefixlen, | 294 | replace); |
300 | ifindex, | ||
301 | (unsigned int)label, | ||
302 | replace); | ||
303 | 295 | ||
304 | newp = ip6addrlbl_alloc(net, prefix, prefixlen, ifindex, label); | 296 | newp = ip6addrlbl_alloc(net, prefix, prefixlen, ifindex, label); |
305 | if (IS_ERR(newp)) | 297 | if (IS_ERR(newp)) |
@@ -321,10 +313,8 @@ static int __ip6addrlbl_del(struct net *net, | |||
321 | struct hlist_node *pos, *n; | 313 | struct hlist_node *pos, *n; |
322 | int ret = -ESRCH; | 314 | int ret = -ESRCH; |
323 | 315 | ||
324 | ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n", | 316 | ADDRLABEL(KERN_DEBUG "%s(prefix=%pI6, prefixlen=%d, ifindex=%d)\n", |
325 | __func__, | 317 | __func__, prefix, prefixlen, ifindex); |
326 | NIP6(*prefix), prefixlen, | ||
327 | ifindex); | ||
328 | 318 | ||
329 | hlist_for_each_entry_safe(p, pos, n, &ip6addrlbl_table.head, list) { | 319 | hlist_for_each_entry_safe(p, pos, n, &ip6addrlbl_table.head, list) { |
330 | if (p->prefixlen == prefixlen && | 320 | if (p->prefixlen == prefixlen && |
@@ -347,10 +337,8 @@ static int ip6addrlbl_del(struct net *net, | |||
347 | struct in6_addr prefix_buf; | 337 | struct in6_addr prefix_buf; |
348 | int ret; | 338 | int ret; |
349 | 339 | ||
350 | ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n", | 340 | ADDRLABEL(KERN_DEBUG "%s(prefix=%pI6, prefixlen=%d, ifindex=%d)\n", |
351 | __func__, | 341 | __func__, prefix, prefixlen, ifindex); |
352 | NIP6(*prefix), prefixlen, | ||
353 | ifindex); | ||
354 | 342 | ||
355 | ipv6_addr_prefix(&prefix_buf, prefix, prefixlen); | 343 | ipv6_addr_prefix(&prefix_buf, prefix, prefixlen); |
356 | spin_lock(&ip6addrlbl_table.lock); | 344 | spin_lock(&ip6addrlbl_table.lock); |