summaryrefslogtreecommitdiff
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-11-19 22:35:57 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:54:29 -0800
commit69d6da0b0faa70249a243a14e6066c013e9294e5 (patch)
treef3678fc834f0b7ba1fc46ef2a4a240e7a937d747 /net/ipv6/icmp.c
parent7bc54c90307b4bc3d7fb2ffd6ad8fbda0671a45e (diff)
[IPv6] RAW: Compact the API for the kernel
Same as in the previous patch for ipv4, compact the API and hide hash table and rwlock inside the raw.c file. Plus fix some "bad" places from checkpatch.pl point of view (assignments inside if()). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r--net/ipv6/icmp.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index f1240688dc58..93c96cfd5ee1 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -555,9 +555,7 @@ out:
static void icmpv6_notify(struct sk_buff *skb, int type, int code, __be32 info)
{
- struct in6_addr *saddr, *daddr;
struct inet6_protocol *ipprot;
- struct sock *sk;
int inner_offset;
int hash;
u8 nexthdr;
@@ -579,9 +577,6 @@ static void icmpv6_notify(struct sk_buff *skb, int type, int code, __be32 info)
if (!pskb_may_pull(skb, inner_offset+8))
return;
- saddr = &ipv6_hdr(skb)->saddr;
- daddr = &ipv6_hdr(skb)->daddr;
-
/* BUGGG_FUTURE: we should try to parse exthdrs in this packet.
Without this we will not able f.e. to make source routed
pmtu discovery.
@@ -597,15 +592,7 @@ static void icmpv6_notify(struct sk_buff *skb, int type, int code, __be32 info)
ipprot->err_handler(skb, NULL, type, code, inner_offset, info);
rcu_read_unlock();
- read_lock(&raw_v6_lock);
- if ((sk = sk_head(&raw_v6_htable[hash])) != NULL) {
- while ((sk = __raw_v6_lookup(sk, nexthdr, saddr, daddr,
- IP6CB(skb)->iif))) {
- rawv6_err(sk, skb, NULL, type, code, inner_offset, info);
- sk = sk_next(sk);
- }
- }
- read_unlock(&raw_v6_lock);
+ raw6_icmp_error(skb, nexthdr, type, code, inner_offset, info);
}
/*