diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/802/psnap.c | 2 | ||||
| -rw-r--r-- | net/Kconfig | 7 | ||||
| -rw-r--r-- | net/ipv4/icmp.c | 3 | ||||
| -rw-r--r-- | net/ipv4/multipath_wrandom.c | 8 | ||||
| -rw-r--r-- | net/ipv6/addrconf.c | 6 | ||||
| -rw-r--r-- | net/ipv6/af_inet6.c | 6 | ||||
| -rw-r--r-- | net/sctp/output.c | 2 | ||||
| -rw-r--r-- | net/sctp/outqueue.c | 12 |
8 files changed, 23 insertions, 23 deletions
diff --git a/net/802/psnap.c b/net/802/psnap.c index 4d638944d933..34e42968b477 100644 --- a/net/802/psnap.c +++ b/net/802/psnap.c | |||
| @@ -59,8 +59,10 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, | |||
| 59 | proto = find_snap_client(skb->h.raw); | 59 | proto = find_snap_client(skb->h.raw); |
| 60 | if (proto) { | 60 | if (proto) { |
| 61 | /* Pass the frame on. */ | 61 | /* Pass the frame on. */ |
| 62 | u8 *hdr = skb->data; | ||
| 62 | skb->h.raw += 5; | 63 | skb->h.raw += 5; |
| 63 | skb_pull(skb, 5); | 64 | skb_pull(skb, 5); |
| 65 | skb_postpull_rcsum(skb, hdr, 5); | ||
| 64 | rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); | 66 | rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); |
| 65 | } else { | 67 | } else { |
| 66 | skb->sk = NULL; | 68 | skb->sk = NULL; |
diff --git a/net/Kconfig b/net/Kconfig index bc603d9aea56..5126f58d9c44 100644 --- a/net/Kconfig +++ b/net/Kconfig | |||
| @@ -27,6 +27,13 @@ if NET | |||
| 27 | 27 | ||
| 28 | menu "Networking options" | 28 | menu "Networking options" |
| 29 | 29 | ||
| 30 | config NETDEBUG | ||
| 31 | bool "Network packet debugging" | ||
| 32 | help | ||
| 33 | You can say Y here if you want to get additional messages useful in | ||
| 34 | debugging bad packets, but can overwhelm logs under denial of service | ||
| 35 | attacks. | ||
| 36 | |||
| 30 | source "net/packet/Kconfig" | 37 | source "net/packet/Kconfig" |
| 31 | source "net/unix/Kconfig" | 38 | source "net/unix/Kconfig" |
| 32 | source "net/xfrm/Kconfig" | 39 | source "net/xfrm/Kconfig" |
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 105039eb7629..6bc0887b0834 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
| @@ -385,7 +385,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) | |||
| 385 | u32 daddr; | 385 | u32 daddr; |
| 386 | 386 | ||
| 387 | if (ip_options_echo(&icmp_param->replyopts, skb)) | 387 | if (ip_options_echo(&icmp_param->replyopts, skb)) |
| 388 | goto out; | 388 | return; |
| 389 | 389 | ||
| 390 | if (icmp_xmit_lock()) | 390 | if (icmp_xmit_lock()) |
| 391 | return; | 391 | return; |
| @@ -416,7 +416,6 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) | |||
| 416 | ip_rt_put(rt); | 416 | ip_rt_put(rt); |
| 417 | out_unlock: | 417 | out_unlock: |
| 418 | icmp_xmit_unlock(); | 418 | icmp_xmit_unlock(); |
| 419 | out:; | ||
| 420 | } | 419 | } |
| 421 | 420 | ||
| 422 | 421 | ||
diff --git a/net/ipv4/multipath_wrandom.c b/net/ipv4/multipath_wrandom.c index d34a9fa608e0..342d0b9098f5 100644 --- a/net/ipv4/multipath_wrandom.c +++ b/net/ipv4/multipath_wrandom.c | |||
| @@ -228,7 +228,7 @@ static void wrandom_set_nhinfo(__u32 network, | |||
| 228 | struct multipath_dest *d, *target_dest = NULL; | 228 | struct multipath_dest *d, *target_dest = NULL; |
| 229 | 229 | ||
| 230 | /* store the weight information for a certain route */ | 230 | /* store the weight information for a certain route */ |
| 231 | spin_lock(&state[state_idx].lock); | 231 | spin_lock_bh(&state[state_idx].lock); |
| 232 | 232 | ||
| 233 | /* find state entry for gateway or add one if necessary */ | 233 | /* find state entry for gateway or add one if necessary */ |
| 234 | list_for_each_entry_rcu(r, &state[state_idx].head, list) { | 234 | list_for_each_entry_rcu(r, &state[state_idx].head, list) { |
| @@ -276,7 +276,7 @@ static void wrandom_set_nhinfo(__u32 network, | |||
| 276 | * we are finished | 276 | * we are finished |
| 277 | */ | 277 | */ |
| 278 | 278 | ||
| 279 | spin_unlock(&state[state_idx].lock); | 279 | spin_unlock_bh(&state[state_idx].lock); |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | static void __multipath_free(struct rcu_head *head) | 282 | static void __multipath_free(struct rcu_head *head) |
| @@ -302,7 +302,7 @@ static void wrandom_flush(void) | |||
| 302 | for (i = 0; i < MULTIPATH_STATE_SIZE; ++i) { | 302 | for (i = 0; i < MULTIPATH_STATE_SIZE; ++i) { |
| 303 | struct multipath_route *r; | 303 | struct multipath_route *r; |
| 304 | 304 | ||
| 305 | spin_lock(&state[i].lock); | 305 | spin_lock_bh(&state[i].lock); |
| 306 | list_for_each_entry_rcu(r, &state[i].head, list) { | 306 | list_for_each_entry_rcu(r, &state[i].head, list) { |
| 307 | struct multipath_dest *d; | 307 | struct multipath_dest *d; |
| 308 | list_for_each_entry_rcu(d, &r->dests, list) { | 308 | list_for_each_entry_rcu(d, &r->dests, list) { |
| @@ -315,7 +315,7 @@ static void wrandom_flush(void) | |||
| 315 | __multipath_free); | 315 | __multipath_free); |
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | spin_unlock(&state[i].lock); | 318 | spin_unlock_bh(&state[i].lock); |
| 319 | } | 319 | } |
| 320 | } | 320 | } |
| 321 | 321 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index d328d5986143..1db50487916b 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -3321,9 +3321,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) | |||
| 3321 | 3321 | ||
| 3322 | switch (event) { | 3322 | switch (event) { |
| 3323 | case RTM_NEWADDR: | 3323 | case RTM_NEWADDR: |
| 3324 | dst_hold(&ifp->rt->u.dst); | 3324 | ip6_ins_rt(ifp->rt, NULL, NULL, NULL); |
| 3325 | if (ip6_ins_rt(ifp->rt, NULL, NULL, NULL)) | ||
| 3326 | dst_release(&ifp->rt->u.dst); | ||
| 3327 | if (ifp->idev->cnf.forwarding) | 3325 | if (ifp->idev->cnf.forwarding) |
| 3328 | addrconf_join_anycast(ifp); | 3326 | addrconf_join_anycast(ifp); |
| 3329 | break; | 3327 | break; |
| @@ -3334,8 +3332,6 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) | |||
| 3334 | dst_hold(&ifp->rt->u.dst); | 3332 | dst_hold(&ifp->rt->u.dst); |
| 3335 | if (ip6_del_rt(ifp->rt, NULL, NULL, NULL)) | 3333 | if (ip6_del_rt(ifp->rt, NULL, NULL, NULL)) |
| 3336 | dst_free(&ifp->rt->u.dst); | 3334 | dst_free(&ifp->rt->u.dst); |
| 3337 | else | ||
| 3338 | dst_release(&ifp->rt->u.dst); | ||
| 3339 | break; | 3335 | break; |
| 3340 | } | 3336 | } |
| 3341 | } | 3337 | } |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 064ffab82a9f..6c9711ac1c03 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
| @@ -369,12 +369,6 @@ int inet6_destroy_sock(struct sock *sk) | |||
| 369 | struct sk_buff *skb; | 369 | struct sk_buff *skb; |
| 370 | struct ipv6_txoptions *opt; | 370 | struct ipv6_txoptions *opt; |
| 371 | 371 | ||
| 372 | /* | ||
| 373 | * Release destination entry | ||
| 374 | */ | ||
| 375 | |||
| 376 | sk_dst_reset(sk); | ||
| 377 | |||
| 378 | /* Release rx options */ | 372 | /* Release rx options */ |
| 379 | 373 | ||
| 380 | if ((skb = xchg(&np->pktoptions, NULL)) != NULL) | 374 | if ((skb = xchg(&np->pktoptions, NULL)) != NULL) |
diff --git a/net/sctp/output.c b/net/sctp/output.c index a40991ef72c9..437cba7260a4 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
| @@ -608,7 +608,7 @@ static sctp_xmit_t sctp_packet_append_data(struct sctp_packet *packet, | |||
| 608 | * When a Fast Retransmit is being performed the sender SHOULD | 608 | * When a Fast Retransmit is being performed the sender SHOULD |
| 609 | * ignore the value of cwnd and SHOULD NOT delay retransmission. | 609 | * ignore the value of cwnd and SHOULD NOT delay retransmission. |
| 610 | */ | 610 | */ |
| 611 | if (!chunk->fast_retransmit) | 611 | if (chunk->fast_retransmit <= 0) |
| 612 | if (transport->flight_size >= transport->cwnd) { | 612 | if (transport->flight_size >= transport->cwnd) { |
| 613 | retval = SCTP_XMIT_RWND_FULL; | 613 | retval = SCTP_XMIT_RWND_FULL; |
| 614 | goto finish; | 614 | goto finish; |
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index efb72faba20c..f148f9576dd2 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
| @@ -406,7 +406,7 @@ void sctp_retransmit_mark(struct sctp_outq *q, | |||
| 406 | * chunks that are not yet acked should be added to the | 406 | * chunks that are not yet acked should be added to the |
| 407 | * retransmit queue. | 407 | * retransmit queue. |
| 408 | */ | 408 | */ |
| 409 | if ((fast_retransmit && chunk->fast_retransmit) || | 409 | if ((fast_retransmit && (chunk->fast_retransmit > 0)) || |
| 410 | (!fast_retransmit && !chunk->tsn_gap_acked)) { | 410 | (!fast_retransmit && !chunk->tsn_gap_acked)) { |
| 411 | /* RFC 2960 6.2.1 Processing a Received SACK | 411 | /* RFC 2960 6.2.1 Processing a Received SACK |
| 412 | * | 412 | * |
| @@ -603,7 +603,8 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, | |||
| 603 | /* Mark the chunk as ineligible for fast retransmit | 603 | /* Mark the chunk as ineligible for fast retransmit |
| 604 | * after it is retransmitted. | 604 | * after it is retransmitted. |
| 605 | */ | 605 | */ |
| 606 | chunk->fast_retransmit = 0; | 606 | if (chunk->fast_retransmit > 0) |
| 607 | chunk->fast_retransmit = -1; | ||
| 607 | 608 | ||
| 608 | *start_timer = 1; | 609 | *start_timer = 1; |
| 609 | q->empty = 0; | 610 | q->empty = 0; |
| @@ -621,7 +622,8 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, | |||
| 621 | list_for_each(lchunk1, lqueue) { | 622 | list_for_each(lchunk1, lqueue) { |
| 622 | chunk1 = list_entry(lchunk1, struct sctp_chunk, | 623 | chunk1 = list_entry(lchunk1, struct sctp_chunk, |
| 623 | transmitted_list); | 624 | transmitted_list); |
| 624 | chunk1->fast_retransmit = 0; | 625 | if (chunk1->fast_retransmit > 0) |
| 626 | chunk1->fast_retransmit = -1; | ||
| 625 | } | 627 | } |
| 626 | } | 628 | } |
| 627 | } | 629 | } |
| @@ -1562,11 +1564,11 @@ static void sctp_mark_missing(struct sctp_outq *q, | |||
| 1562 | /* | 1564 | /* |
| 1563 | * M4) If any DATA chunk is found to have a | 1565 | * M4) If any DATA chunk is found to have a |
| 1564 | * 'TSN.Missing.Report' | 1566 | * 'TSN.Missing.Report' |
| 1565 | * value larger than or equal to 4, mark that chunk for | 1567 | * value larger than or equal to 3, mark that chunk for |
| 1566 | * retransmission and start the fast retransmit procedure. | 1568 | * retransmission and start the fast retransmit procedure. |
| 1567 | */ | 1569 | */ |
| 1568 | 1570 | ||
| 1569 | if (chunk->tsn_missing_report >= 4) { | 1571 | if (chunk->tsn_missing_report >= 3) { |
| 1570 | chunk->fast_retransmit = 1; | 1572 | chunk->fast_retransmit = 1; |
| 1571 | do_fast_retransmit = 1; | 1573 | do_fast_retransmit = 1; |
| 1572 | } | 1574 | } |
