Skip to content

Commit

Permalink
[NET] IPV4: 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
YOSHIFUJI Hideaki authored and David S. Miller committed Feb 11, 2007
1 parent 6426565 commit e905a9e
Show file tree
Hide file tree
Showing 120 changed files with 1,779 additions and 1,779 deletions.
72 changes: 36 additions & 36 deletions net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
if (err < 0)
goto out;

sock->state = SS_CONNECTING;
sock->state = SS_CONNECTING;

/* Just entered SS_CONNECTING state; the only
* difference is that return value in non-blocking
Expand Down Expand Up @@ -878,36 +878,36 @@ static struct net_proto_family inet_family_ops = {
*/
static struct inet_protosw inetsw_array[] =
{
{
.type = SOCK_STREAM,
.protocol = IPPROTO_TCP,
.prot = &tcp_prot,
.ops = &inet_stream_ops,
.capability = -1,
.no_check = 0,
.flags = INET_PROTOSW_PERMANENT |
{
.type = SOCK_STREAM,
.protocol = IPPROTO_TCP,
.prot = &tcp_prot,
.ops = &inet_stream_ops,
.capability = -1,
.no_check = 0,
.flags = INET_PROTOSW_PERMANENT |
INET_PROTOSW_ICSK,
},

{
.type = SOCK_DGRAM,
.protocol = IPPROTO_UDP,
.prot = &udp_prot,
.ops = &inet_dgram_ops,
.capability = -1,
.no_check = UDP_CSUM_DEFAULT,
.flags = INET_PROTOSW_PERMANENT,
},

{
.type = SOCK_DGRAM,
.protocol = IPPROTO_UDP,
.prot = &udp_prot,
.ops = &inet_dgram_ops,
.capability = -1,
.no_check = UDP_CSUM_DEFAULT,
.flags = INET_PROTOSW_PERMANENT,
},


{
.type = SOCK_RAW,
.protocol = IPPROTO_IP, /* wild card */
.prot = &raw_prot,
.ops = &inet_sockraw_ops,
.capability = CAP_NET_RAW,
.no_check = UDP_CSUM_DEFAULT,
.flags = INET_PROTOSW_REUSE,
.type = SOCK_RAW,
.protocol = IPPROTO_IP, /* wild card */
.prot = &raw_prot,
.ops = &inet_sockraw_ops,
.capability = CAP_NET_RAW,
.no_check = UDP_CSUM_DEFAULT,
.flags = INET_PROTOSW_REUSE,
}
};

Expand Down Expand Up @@ -946,7 +946,7 @@ void inet_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 @@ -1073,7 +1073,7 @@ int inet_sk_rebuild_header(struct sock *sk)
},
},
};

security_sk_classify_flow(sk, &fl);
err = ip_route_output_flow(&rt, &fl, sk, 0);
}
Expand Down Expand Up @@ -1273,10 +1273,10 @@ static int __init inet_init(void)
goto out_unregister_udp_proto;

/*
* Tell SOCKET that we are alive...
* Tell SOCKET that we are alive...
*/

(void)sock_register(&inet_family_ops);
(void)sock_register(&inet_family_ops);

/*
* Add all the base protocols.
Expand Down Expand Up @@ -1306,9 +1306,9 @@ static int __init inet_init(void)

arp_init();

/*
* Set the IP module up
*/
/*
* Set the IP module up
*/

ip_init();

Expand All @@ -1334,11 +1334,11 @@ static int __init inet_init(void)
#endif
/*
* Initialise per-cpu ipv4 mibs
*/
*/

if(init_ipv4_mibs())
printk(KERN_CRIT "inet_init: Cannot init ipv4 mibs\n"); ;

ipv4_proc_init();

ipfrag_init();
Expand Down
20 changes: 10 additions & 10 deletions net/ipv4/ah4.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static int ah_output(struct xfrm_state *x, struct sk_buff *skb)
top_iph->check = 0;

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

ah->reserved = 0;
Expand Down Expand Up @@ -135,9 +135,9 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
ah = (struct ip_auth_hdr*)skb->data;
ahp = x->data;
ah_hlen = (ah->hdrlen + 2) << 2;

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

if (!pskb_may_pull(skb, ah_hlen))
Expand Down Expand Up @@ -166,9 +166,9 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
if (ip_clear_mutable_options(iph, &dummy))
goto out;
}
{
{
u8 auth_data[MAX_AH_AUTH_LEN];

memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len);
skb_push(skb, ihl);
err = ah_mac_digest(ahp, skb, ah->auth_data);
Expand Down Expand Up @@ -237,7 +237,7 @@ static int ah_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 @@ -254,16 +254,16 @@ static int ah_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 ip_auth_hdr) + ahp->icv_trunc_len);
if (x->props.mode == XFRM_MODE_TUNNEL)
x->props.header_len += sizeof(struct iphdr);
Expand Down
Loading

0 comments on commit e905a9e

Please sign in to comment.