aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/raw.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:47 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:39 -0500
commite905a9edab7f4f14f9213b52234e4a346c690911 (patch)
tree9e52a5f47eec47c5685c347ff7af22290a10305b /net/ipv4/raw.c
parent642656518b2e64fd59d9bbd15b6885cac5fe99b1 (diff)
[NET] IPV4: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r--net/ipv4/raw.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index fed6a1e7af9e..931084bfb572 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -95,7 +95,7 @@ static void raw_v4_hash(struct sock *sk)
95 95
96static void raw_v4_unhash(struct sock *sk) 96static void raw_v4_unhash(struct sock *sk)
97{ 97{
98 write_lock_bh(&raw_v4_lock); 98 write_lock_bh(&raw_v4_lock);
99 if (sk_del_node_init(sk)) 99 if (sk_del_node_init(sk))
100 sock_prot_dec_use(sk->sk_prot); 100 sock_prot_dec_use(sk->sk_prot);
101 write_unlock_bh(&raw_v4_lock); 101 write_unlock_bh(&raw_v4_lock);
@@ -238,7 +238,7 @@ void raw_err (struct sock *sk, struct sk_buff *skb, u32 info)
238static int raw_rcv_skb(struct sock * sk, struct sk_buff * skb) 238static int raw_rcv_skb(struct sock * sk, struct sk_buff * skb)
239{ 239{
240 /* Charge it to the socket. */ 240 /* Charge it to the socket. */
241 241
242 if (sock_queue_rcv_skb(sk, skb) < 0) { 242 if (sock_queue_rcv_skb(sk, skb) < 0) {
243 /* FIXME: increment a raw drops counter here */ 243 /* FIXME: increment a raw drops counter here */
244 kfree_skb(skb); 244 kfree_skb(skb);
@@ -263,7 +263,7 @@ int raw_rcv(struct sock *sk, struct sk_buff *skb)
263} 263}
264 264
265static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, 265static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
266 struct rtable *rt, 266 struct rtable *rt,
267 unsigned int flags) 267 unsigned int flags)
268{ 268{
269 struct inet_sock *inet = inet_sk(sk); 269 struct inet_sock *inet = inet_sk(sk);
@@ -285,7 +285,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
285 skb = sock_alloc_send_skb(sk, length+hh_len+15, 285 skb = sock_alloc_send_skb(sk, length+hh_len+15,
286 flags&MSG_DONTWAIT, &err); 286 flags&MSG_DONTWAIT, &err);
287 if (skb == NULL) 287 if (skb == NULL)
288 goto error; 288 goto error;
289 skb_reserve(skb, hh_len); 289 skb_reserve(skb, hh_len);
290 290
291 skb->priority = sk->sk_priority; 291 skb->priority = sk->sk_priority;
@@ -326,7 +326,7 @@ error_fault:
326 kfree_skb(skb); 326 kfree_skb(skb);
327error: 327error:
328 IP_INC_STATS(IPSTATS_MIB_OUTDISCARDS); 328 IP_INC_STATS(IPSTATS_MIB_OUTDISCARDS);
329 return err; 329 return err;
330} 330}
331 331
332static int raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg) 332static int raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
@@ -399,9 +399,9 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
399 err = -EOPNOTSUPP; 399 err = -EOPNOTSUPP;
400 if (msg->msg_flags & MSG_OOB) /* Mirror BSD error message */ 400 if (msg->msg_flags & MSG_OOB) /* Mirror BSD error message */
401 goto out; /* compatibility */ 401 goto out; /* compatibility */
402 402
403 /* 403 /*
404 * Get and verify the address. 404 * Get and verify the address.
405 */ 405 */
406 406
407 if (msg->msg_namelen) { 407 if (msg->msg_namelen) {
@@ -426,7 +426,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
426 */ 426 */
427 } else { 427 } else {
428 err = -EDESTADDRREQ; 428 err = -EDESTADDRREQ;
429 if (sk->sk_state != TCP_ESTABLISHED) 429 if (sk->sk_state != TCP_ESTABLISHED)
430 goto out; 430 goto out;
431 daddr = inet->daddr; 431 daddr = inet->daddr;
432 } 432 }
@@ -480,7 +480,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
480 .saddr = saddr, 480 .saddr = saddr,
481 .tos = tos } }, 481 .tos = tos } },
482 .proto = inet->hdrincl ? IPPROTO_RAW : 482 .proto = inet->hdrincl ? IPPROTO_RAW :
483 sk->sk_protocol, 483 sk->sk_protocol,
484 }; 484 };
485 if (!inet->hdrincl) { 485 if (!inet->hdrincl) {
486 err = raw_probe_proto_opt(&fl, msg); 486 err = raw_probe_proto_opt(&fl, msg);
@@ -503,9 +503,9 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
503back_from_confirm: 503back_from_confirm:
504 504
505 if (inet->hdrincl) 505 if (inet->hdrincl)
506 err = raw_send_hdrinc(sk, msg->msg_iov, len, 506 err = raw_send_hdrinc(sk, msg->msg_iov, len,
507 rt, msg->msg_flags); 507 rt, msg->msg_flags);
508 508
509 else { 509 else {
510 if (!ipc.addr) 510 if (!ipc.addr)
511 ipc.addr = rt->rt_dst; 511 ipc.addr = rt->rt_dst;
@@ -538,7 +538,7 @@ do_confirm:
538 538
539static void raw_close(struct sock *sk, long timeout) 539static void raw_close(struct sock *sk, long timeout)
540{ 540{
541 /* 541 /*
542 * Raw sockets may have direct kernel refereneces. Kill them. 542 * Raw sockets may have direct kernel refereneces. Kill them.
543 */ 543 */
544 ip_ra_control(sk, 0, NULL); 544 ip_ra_control(sk, 0, NULL);
@@ -861,7 +861,7 @@ static __inline__ char *get_raw_sock(struct sock *sp, char *tmpbuf, int i)
861 861
862 sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X" 862 sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X"
863 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p", 863 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p",
864 i, src, srcp, dest, destp, sp->sk_state, 864 i, src, srcp, dest, destp, sp->sk_state,
865 atomic_read(&sp->sk_wmem_alloc), 865 atomic_read(&sp->sk_wmem_alloc),
866 atomic_read(&sp->sk_rmem_alloc), 866 atomic_read(&sp->sk_rmem_alloc),
867 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp), 867 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),