aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 0ef48126b117..e17a823ca90f 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -102,11 +102,11 @@ static __init int sctp_proc_init(void)
102 } 102 }
103 103
104 if (sctp_snmp_proc_init()) 104 if (sctp_snmp_proc_init())
105 goto out_nomem; 105 goto out_nomem;
106 if (sctp_eps_proc_init()) 106 if (sctp_eps_proc_init())
107 goto out_nomem; 107 goto out_nomem;
108 if (sctp_assocs_proc_init()) 108 if (sctp_assocs_proc_init())
109 goto out_nomem; 109 goto out_nomem;
110 110
111 return 0; 111 return 0;
112 112
@@ -114,7 +114,7 @@ out_nomem:
114 return -ENOMEM; 114 return -ENOMEM;
115} 115}
116 116
117/* Clean up the proc fs entry for the SCTP protocol. 117/* Clean up the proc fs entry for the SCTP protocol.
118 * Note: Do not make this __exit as it is used in the init error 118 * Note: Do not make this __exit as it is used in the init error
119 * path. 119 * path.
120 */ 120 */
@@ -286,7 +286,7 @@ static int sctp_v4_to_addr_param(const union sctp_addr *addr,
286 286
287 param->v4.param_hdr.type = SCTP_PARAM_IPV4_ADDRESS; 287 param->v4.param_hdr.type = SCTP_PARAM_IPV4_ADDRESS;
288 param->v4.param_hdr.length = htons(length); 288 param->v4.param_hdr.length = htons(length);
289 param->v4.addr.s_addr = addr->v4.sin_addr.s_addr; 289 param->v4.addr.s_addr = addr->v4.sin_addr.s_addr;
290 290
291 return length; 291 return length;
292} 292}
@@ -344,9 +344,9 @@ static int sctp_v4_addr_valid(union sctp_addr *addr,
344 if (IS_IPV4_UNUSABLE_ADDRESS(&addr->v4.sin_addr.s_addr)) 344 if (IS_IPV4_UNUSABLE_ADDRESS(&addr->v4.sin_addr.s_addr))
345 return 0; 345 return 0;
346 346
347 /* Is this a broadcast address? */ 347 /* Is this a broadcast address? */
348 if (skb && ((struct rtable *)skb->dst)->rt_flags & RTCF_BROADCAST) 348 if (skb && ((struct rtable *)skb->dst)->rt_flags & RTCF_BROADCAST)
349 return 0; 349 return 0;
350 350
351 return 1; 351 return 1;
352} 352}
@@ -494,7 +494,7 @@ out_unlock:
494out: 494out:
495 if (dst) 495 if (dst)
496 SCTP_DEBUG_PRINTK("rt_dst:%u.%u.%u.%u, rt_src:%u.%u.%u.%u\n", 496 SCTP_DEBUG_PRINTK("rt_dst:%u.%u.%u.%u, rt_src:%u.%u.%u.%u\n",
497 NIPQUAD(rt->rt_dst), NIPQUAD(rt->rt_src)); 497 NIPQUAD(rt->rt_dst), NIPQUAD(rt->rt_src));
498 else 498 else
499 SCTP_DEBUG_PRINTK("NO ROUTE\n"); 499 SCTP_DEBUG_PRINTK("NO ROUTE\n");
500 500
@@ -517,14 +517,14 @@ static void sctp_v4_get_saddr(struct sctp_association *asoc,
517 if (rt) { 517 if (rt) {
518 saddr->v4.sin_family = AF_INET; 518 saddr->v4.sin_family = AF_INET;
519 saddr->v4.sin_port = htons(asoc->base.bind_addr.port); 519 saddr->v4.sin_port = htons(asoc->base.bind_addr.port);
520 saddr->v4.sin_addr.s_addr = rt->rt_src; 520 saddr->v4.sin_addr.s_addr = rt->rt_src;
521 } 521 }
522} 522}
523 523
524/* What interface did this skb arrive on? */ 524/* What interface did this skb arrive on? */
525static int sctp_v4_skb_iif(const struct sk_buff *skb) 525static int sctp_v4_skb_iif(const struct sk_buff *skb)
526{ 526{
527 return ((struct rtable *)skb->dst)->rt_iif; 527 return ((struct rtable *)skb->dst)->rt_iif;
528} 528}
529 529
530/* Was this packet marked by Explicit Congestion Notification? */ 530/* Was this packet marked by Explicit Congestion Notification? */
@@ -569,7 +569,7 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
569 newinet->dport = htons(asoc->peer.port); 569 newinet->dport = htons(asoc->peer.port);
570 newinet->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr; 570 newinet->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr;
571 newinet->pmtudisc = inet->pmtudisc; 571 newinet->pmtudisc = inet->pmtudisc;
572 newinet->id = asoc->next_tsn ^ jiffies; 572 newinet->id = asoc->next_tsn ^ jiffies;
573 573
574 newinet->uc_ttl = -1; 574 newinet->uc_ttl = -1;
575 newinet->mc_loop = 1; 575 newinet->mc_loop = 1;