diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2006-08-24 10:18:12 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:17:58 -0400 |
commit | e731c248ba9e8c7025ae8b4a3fa48e4236b82e52 (patch) | |
tree | 784c9e9420283f73604f81f31f445ab9b097795a /net/ipv6/mip6.c | |
parent | e4bec827feda76d5e7417a2696a75424834d564f (diff) |
[IPV6] MIP6: Several obvious clean-ups.
- Remove redundant code. Pointed out by Brian Haley <brian.haley@hp.com>.
- Unify code paths with/without CONFIG_IPV6_MIP.
- Use NIP6_FMT for IPv6 address textual presentation.
- Fold long line. Pointed out by David Miller <davem@davemloft.net>.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/mip6.c')
-rw-r--r-- | net/ipv6/mip6.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c index 70854035c131..99d116caecda 100644 --- a/net/ipv6/mip6.c +++ b/net/ipv6/mip6.c | |||
@@ -121,7 +121,8 @@ int mip6_mh_filter(struct sock *sk, struct sk_buff *skb) | |||
121 | &skb->nh.ipv6h->daddr, | 121 | &skb->nh.ipv6h->daddr, |
122 | mhlen, IPPROTO_MH, | 122 | mhlen, IPPROTO_MH, |
123 | skb_checksum(skb, 0, mhlen, 0))) { | 123 | skb_checksum(skb, 0, mhlen, 0))) { |
124 | LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH checksum failed [%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x > %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]\n", | 124 | LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH checksum failed " |
125 | "[" NIP6_FMT " > " NIP6_FMT "]\n", | ||
125 | NIP6(skb->nh.ipv6h->saddr), | 126 | NIP6(skb->nh.ipv6h->saddr), |
126 | NIP6(skb->nh.ipv6h->daddr)); | 127 | NIP6(skb->nh.ipv6h->daddr)); |
127 | return -1; | 128 | return -1; |
@@ -234,7 +235,8 @@ static int mip6_destopt_reject(struct xfrm_state *x, struct sk_buff *skb, struct | |||
234 | struct timeval stamp; | 235 | struct timeval stamp; |
235 | int err = 0; | 236 | int err = 0; |
236 | 237 | ||
237 | if (unlikely(fl->proto == IPPROTO_MH && fl->fl_mh_type <= IP6_MH_TYPE_MAX)) | 238 | if (unlikely(fl->proto == IPPROTO_MH && |
239 | fl->fl_mh_type <= IP6_MH_TYPE_MAX)) | ||
238 | goto out; | 240 | goto out; |
239 | 241 | ||
240 | if (likely(opt->dsthao)) { | 242 | if (likely(opt->dsthao)) { |