Skip to content

Commit

Permalink
[NET] IPV6: Fix whitespace errors.
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
yoshfuji authored and David S. Miller committed Feb 11, 2007
1 parent e905a9e commit 1ab1457
Show file tree
Hide file tree
Showing 49 changed files with 869 additions and 869 deletions.
198 changes: 99 additions & 99 deletions net/ipv6/addrconf.c

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* PF_INET6 socket protocol family
* Linux INET6 implementation
* Linux INET6 implementation
*
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
* Pedro Roque <roque@di.fc.ul.pt>
*
* Adapted from linux/net/ipv4/af_inet.c
*
Expand Down Expand Up @@ -191,7 +191,7 @@ static int inet6_create(struct socket *sock, int protocol)
np->mc_loop = 1;
np->pmtudisc = IPV6_PMTUDISC_WANT;
np->ipv6only = sysctl_ipv6_bindv6only;

/* Init the ipv4 part of the socket since we can have sockets
* using v6 API for ipv4.
*/
Expand All @@ -206,7 +206,7 @@ static int inet6_create(struct socket *sock, int protocol)
inet->pmtudisc = IP_PMTUDISC_DONT;
else
inet->pmtudisc = IP_PMTUDISC_WANT;
/*
/*
* Increment only the relevant sk_prot->socks debug field, this changes
* the previous behaviour of incrementing both the equivalent to
* answer->prot->socks (inet6_sock_nr) and inet_sock_nr.
Expand Down Expand Up @@ -293,7 +293,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
*/
sk->sk_bound_dev_if = addr->sin6_scope_id;
}

/* Binding to link-local address requires an interface */
if (!sk->sk_bound_dev_if) {
err = -EINVAL;
Expand Down Expand Up @@ -327,7 +327,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
inet->saddr = v4addr;

ipv6_addr_copy(&np->rcv_saddr, &addr->sin6_addr);

if (!(addr_type & IPV6_ADDR_MULTICAST))
ipv6_addr_copy(&np->saddr, &addr->sin6_addr);

Expand Down Expand Up @@ -393,15 +393,15 @@ EXPORT_SYMBOL_GPL(inet6_destroy_sock);
/*
* This does both peername and sockname.
*/

int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
int *uaddr_len, int peer)
{
struct sockaddr_in6 *sin=(struct sockaddr_in6 *)uaddr;
struct sock *sk = sock->sk;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);

sin->sin6_family = AF_INET6;
sin->sin6_flowinfo = 0;
sin->sin6_scope_id = 0;
Expand Down Expand Up @@ -433,14 +433,14 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
struct sock *sk = sock->sk;

switch(cmd)
switch(cmd)
{
case SIOCGSTAMP:
return sock_get_timestamp(sk, (struct timeval __user *)arg);

case SIOCADDRT:
case SIOCDELRT:

return(ipv6_route_ioctl(cmd,(void __user *)arg));

case SIOCSIFADDR:
Expand Down Expand Up @@ -584,7 +584,7 @@ inet6_register_protosw(struct inet_protosw *p)
/* Add the new entry after the last permanent entry if any, so that
* the new entry does not override a permanent entry when matched with
* a wild-card protocol. But it is allowed to override any existing
* non-permanent entry. This means that when we remove this entry, the
* non-permanent entry. This means that when we remove this entry, the
* system automatically returns to the old behavior.
*/
list_add_rcu(&p->list, last_perm);
Expand Down Expand Up @@ -749,7 +749,7 @@ static int __init init_ipv6_mibs(void)
snmp6_mib_free((void **)ipv6_statistics);
err_ip_mib:
return -ENOMEM;

}

static void cleanup_ipv6_mibs(void)
Expand All @@ -763,7 +763,7 @@ static void cleanup_ipv6_mibs(void)
static int __init inet6_init(void)
{
struct sk_buff *dummy_skb;
struct list_head *r;
struct list_head *r;
int err;

BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb));
Expand Down Expand Up @@ -814,7 +814,7 @@ static int __init inet6_init(void)
err = init_ipv6_mibs();
if (err)
goto out_unregister_sock;

/*
* ipngwg API draft makes clear that the correct semantics
* for TCP and UDP is to consider one TCP and UDP instance
Expand Down Expand Up @@ -933,11 +933,11 @@ static void __exit inet6_exit(void)
#ifdef CONFIG_PROC_FS
if6_proc_exit();
ac6_proc_exit();
ipv6_misc_proc_exit();
udp6_proc_exit();
udplite6_proc_exit();
tcp6_proc_exit();
raw6_proc_exit();
ipv6_misc_proc_exit();
udp6_proc_exit();
udplite6_proc_exit();
tcp6_proc_exit();
raw6_proc_exit();
#endif
#ifdef CONFIG_IPV6_MIP6
mip6_fini();
Expand All @@ -952,7 +952,7 @@ static void __exit inet6_exit(void)
ndisc_cleanup();
icmpv6_cleanup();
#ifdef CONFIG_SYSCTL
ipv6_sysctl_unregister();
ipv6_sysctl_unregister();
#endif
cleanup_ipv6_mibs();
proto_unregister(&rawv6_prot);
Expand Down
40 changes: 20 additions & 20 deletions net/ipv6/ah6.c
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
/*
* Copyright (C)2002 USAGI/WIDE Project
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors
*
* Mitsuru KANDA @USAGI : IPv6 Support
* Mitsuru KANDA @USAGI : IPv6 Support
* Kazunori MIYAZAWA @USAGI :
* Kunihiro Ishiguro <kunihiro@ipinfusion.com>
*
*
* This file is derived from net/ipv4/ah.c.
*/

Expand Down Expand Up @@ -54,7 +54,7 @@ static int zero_out_mutable_opts(struct ipv6_opt_hdr *opthdr)
optlen = 1;
break;
default:
if (len < 2)
if (len < 2)
goto bad;
optlen = opt[off+1]+2;
if (len < optlen)
Expand Down Expand Up @@ -152,7 +152,7 @@ static void ipv6_rearrange_rthdr(struct ipv6hdr *iph, struct ipv6_rt_hdr *rthdr)
segments_left = rthdr->segments_left;
if (segments_left == 0)
return;
rthdr->segments_left = 0;
rthdr->segments_left = 0;

/* The value of rthdr->hdrlen has been verified either by the system
* call if it is locally generated, or by ipv6_rthdr_rcv() for incoming
Expand Down Expand Up @@ -278,7 +278,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb)
top_iph->hop_limit = 0;

ahp = x->data;
ah->hdrlen = (XFRM_ALIGN8(sizeof(struct ipv6_auth_hdr) +
ah->hdrlen = (XFRM_ALIGN8(sizeof(struct ipv6_auth_hdr) +
ahp->icv_trunc_len) >> 2) - 2;

ah->reserved = 0;
Expand Down Expand Up @@ -319,7 +319,7 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
* Moving the pointer of skb->nh.raw by using skb_pull as long as AH
* header length. Then copy back the copy as long as hdr_len
* If destination header following AH exists, copy it into after [Ext2].
*
*
* |<>|[IPv6][Ext1][Ext2][Dest][Payload]
* There is offset of AH before IPv6 header after the process.
*/
Expand Down Expand Up @@ -347,9 +347,9 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
nexthdr = ah->nexthdr;
ah_hlen = (ah->hdrlen + 2) << 2;

if (ah_hlen != XFRM_ALIGN8(sizeof(struct ipv6_auth_hdr) + ahp->icv_full_len) &&
ah_hlen != XFRM_ALIGN8(sizeof(struct ipv6_auth_hdr) + ahp->icv_trunc_len))
goto out;
if (ah_hlen != XFRM_ALIGN8(sizeof(struct ipv6_auth_hdr) + ahp->icv_full_len) &&
ah_hlen != XFRM_ALIGN8(sizeof(struct ipv6_auth_hdr) + ahp->icv_trunc_len))
goto out;

if (!pskb_may_pull(skb, ah_hlen))
goto out;
Expand All @@ -365,7 +365,7 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
skb->nh.ipv6h->flow_lbl[2] = 0;
skb->nh.ipv6h->hop_limit = 0;

{
{
u8 auth_data[MAX_AH_AUTH_LEN];

memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len);
Expand Down Expand Up @@ -395,8 +395,8 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
return err;
}

static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
int type, int code, int offset, __be32 info)
static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
int type, int code, int offset, __be32 info)
{
struct ipv6hdr *iph = (struct ipv6hdr*)skb->data;
struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+offset);
Expand Down Expand Up @@ -445,7 +445,7 @@ static int ah6_init_state(struct xfrm_state *x)
ahp->tfm = tfm;
if (crypto_hash_setkey(tfm, ahp->key, ahp->key_len))
goto error;

/*
* Lookup the algorithm description maintained by xfrm_algo,
* verify crypto transform properties, and store information
Expand All @@ -462,16 +462,16 @@ static int ah6_init_state(struct xfrm_state *x)
aalg_desc->uinfo.auth.icv_fullbits/8);
goto error;
}

ahp->icv_full_len = aalg_desc->uinfo.auth.icv_fullbits/8;
ahp->icv_trunc_len = aalg_desc->uinfo.auth.icv_truncbits/8;

BUG_ON(ahp->icv_trunc_len > MAX_AH_AUTH_LEN);

ahp->work_icv = kmalloc(ahp->icv_full_len, GFP_KERNEL);
if (!ahp->work_icv)
goto error;

x->props.header_len = XFRM_ALIGN8(sizeof(struct ipv6_auth_hdr) + ahp->icv_trunc_len);
if (x->props.mode == XFRM_MODE_TUNNEL)
x->props.header_len += sizeof(struct ipv6hdr);
Expand Down
4 changes: 2 additions & 2 deletions net/ipv6/anycast.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Anycast support for IPv6
* Linux INET6 implementation
* Linux INET6 implementation
*
* Authors:
* David L Stevens (dlstevens@us.ibm.com)
Expand Down Expand Up @@ -397,7 +397,7 @@ static int ipv6_dev_ac_dec(struct net_device *dev, struct in6_addr *addr)
in6_dev_put(idev);
return ret;
}

/*
* check if the interface has this anycast address
*/
Expand Down
Loading

0 comments on commit 1ab1457

Please sign in to comment.