diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_input.c | 4 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 5 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 2 | ||||
-rw-r--r-- | net/llc/af_llc.c | 5 | ||||
-rw-r--r-- | net/llc/llc_c_ac.c | 20 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 7 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_standalone.c | 2 |
7 files changed, 29 insertions, 16 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 40a26b7157b4..bf2e23086bce 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -367,7 +367,7 @@ static void tcp_rcv_rtt_update(struct tcp_sock *tp, u32 sample, int win_dep) | |||
367 | * are stalled on filesystem I/O. | 367 | * are stalled on filesystem I/O. |
368 | * | 368 | * |
369 | * Also, since we are only going for a minimum in the | 369 | * Also, since we are only going for a minimum in the |
370 | * non-timestamp case, we do not smoother things out | 370 | * non-timestamp case, we do not smooth things out |
371 | * else with timestamps disabled convergence takes too | 371 | * else with timestamps disabled convergence takes too |
372 | * long. | 372 | * long. |
373 | */ | 373 | */ |
@@ -546,7 +546,7 @@ static void tcp_rtt_estimator(struct sock *sk, const __u32 mrtt) | |||
546 | * | 546 | * |
547 | * Funny. This algorithm seems to be very broken. | 547 | * Funny. This algorithm seems to be very broken. |
548 | * These formulae increase RTO, when it should be decreased, increase | 548 | * These formulae increase RTO, when it should be decreased, increase |
549 | * too slowly, when it should be increased fastly, decrease too fastly | 549 | * too slowly, when it should be increased quickly, decrease too quickly |
550 | * etc. I guess in BSD RTO takes ONE value, so that it is absolutely | 550 | * etc. I guess in BSD RTO takes ONE value, so that it is absolutely |
551 | * does not matter how to _calculate_ it. Seems, it was trap | 551 | * does not matter how to _calculate_ it. Seems, it was trap |
552 | * that VJ failed to avoid. 8) | 552 | * that VJ failed to avoid. 8) |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index ddcf7754eec2..56a09a4ac410 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1045,9 +1045,10 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev, | |||
1045 | } | 1045 | } |
1046 | #endif | 1046 | #endif |
1047 | /* Rule 8: Use longest matching prefix */ | 1047 | /* Rule 8: Use longest matching prefix */ |
1048 | if (hiscore.rule < 8) | 1048 | if (hiscore.rule < 8) { |
1049 | hiscore.matchlen = ipv6_addr_diff(&ifa_result->addr, daddr); | 1049 | hiscore.matchlen = ipv6_addr_diff(&ifa_result->addr, daddr); |
1050 | score.rule++; | 1050 | hiscore.rule++; |
1051 | } | ||
1051 | score.matchlen = ipv6_addr_diff(&ifa->addr, daddr); | 1052 | score.matchlen = ipv6_addr_diff(&ifa->addr, daddr); |
1052 | if (score.matchlen > hiscore.matchlen) { | 1053 | if (score.matchlen > hiscore.matchlen) { |
1053 | score.rule = 8; | 1054 | score.rule = 8; |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 003fd99ff597..25757ade989f 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -287,7 +287,7 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
287 | { | 287 | { |
288 | struct ipv6_txoptions *opt; | 288 | struct ipv6_txoptions *opt; |
289 | if (optlen == 0) | 289 | if (optlen == 0) |
290 | optval = 0; | 290 | optval = NULL; |
291 | 291 | ||
292 | /* hop-by-hop / destination options are privileged option */ | 292 | /* hop-by-hop / destination options are privileged option */ |
293 | retv = -EPERM; | 293 | retv = -EPERM; |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 59d02cbbeb9e..c3f0b0783453 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -116,7 +116,9 @@ static int llc_ui_send_data(struct sock* sk, struct sk_buff *skb, int noblock) | |||
116 | struct llc_sock* llc = llc_sk(sk); | 116 | struct llc_sock* llc = llc_sk(sk); |
117 | int rc = 0; | 117 | int rc = 0; |
118 | 118 | ||
119 | if (unlikely(llc_data_accept_state(llc->state) || llc->p_flag)) { | 119 | if (unlikely(llc_data_accept_state(llc->state) || |
120 | llc->remote_busy_flag || | ||
121 | llc->p_flag)) { | ||
120 | long timeout = sock_sndtimeo(sk, noblock); | 122 | long timeout = sock_sndtimeo(sk, noblock); |
121 | 123 | ||
122 | rc = llc_ui_wait_for_busy_core(sk, timeout); | 124 | rc = llc_ui_wait_for_busy_core(sk, timeout); |
@@ -542,6 +544,7 @@ static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout) | |||
542 | if (sk_wait_event(sk, &timeout, | 544 | if (sk_wait_event(sk, &timeout, |
543 | (sk->sk_shutdown & RCV_SHUTDOWN) || | 545 | (sk->sk_shutdown & RCV_SHUTDOWN) || |
544 | (!llc_data_accept_state(llc->state) && | 546 | (!llc_data_accept_state(llc->state) && |
547 | !llc->remote_busy_flag && | ||
545 | !llc->p_flag))) | 548 | !llc->p_flag))) |
546 | break; | 549 | break; |
547 | rc = -ERESTARTSYS; | 550 | rc = -ERESTARTSYS; |
diff --git a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c index b0bcfb1f12dd..91fb6bc1b116 100644 --- a/net/llc/llc_c_ac.c +++ b/net/llc/llc_c_ac.c | |||
@@ -866,7 +866,8 @@ int llc_conn_ac_send_ack_if_needed(struct sock *sk, struct sk_buff *skb) | |||
866 | llc->ack_must_be_send = 1; | 866 | llc->ack_must_be_send = 1; |
867 | llc->ack_pf = pf_bit & 1; | 867 | llc->ack_pf = pf_bit & 1; |
868 | } | 868 | } |
869 | if (((llc->vR - llc->first_pdu_Ns + 129) % 128) >= llc->npta) { | 869 | if (((llc->vR - llc->first_pdu_Ns + 1 + LLC_2_SEQ_NBR_MODULO) |
870 | % LLC_2_SEQ_NBR_MODULO) >= llc->npta) { | ||
870 | llc_conn_ac_send_rr_rsp_f_set_ackpf(sk, skb); | 871 | llc_conn_ac_send_rr_rsp_f_set_ackpf(sk, skb); |
871 | llc->ack_must_be_send = 0; | 872 | llc->ack_must_be_send = 0; |
872 | llc->ack_pf = 0; | 873 | llc->ack_pf = 0; |
@@ -994,8 +995,8 @@ static int llc_conn_ac_inc_npta_value(struct sock *sk, struct sk_buff *skb) | |||
994 | llc->dec_step = 0; | 995 | llc->dec_step = 0; |
995 | llc->dec_cntr = llc->inc_cntr = 2; | 996 | llc->dec_cntr = llc->inc_cntr = 2; |
996 | ++llc->npta; | 997 | ++llc->npta; |
997 | if (llc->npta > 127) | 998 | if (llc->npta > ~LLC_2_SEQ_NBR_MODULO) |
998 | llc->npta = 127 ; | 999 | llc->npta = ~LLC_2_SEQ_NBR_MODULO ; |
999 | } else | 1000 | } else |
1000 | --llc->inc_cntr; | 1001 | --llc->inc_cntr; |
1001 | return 0; | 1002 | return 0; |
@@ -1065,9 +1066,10 @@ int llc_conn_ac_dec_tx_win_size(struct sock *sk, struct sk_buff *skb) | |||
1065 | struct llc_sock *llc = llc_sk(sk); | 1066 | struct llc_sock *llc = llc_sk(sk); |
1066 | u8 unacked_pdu = skb_queue_len(&llc->pdu_unack_q); | 1067 | u8 unacked_pdu = skb_queue_len(&llc->pdu_unack_q); |
1067 | 1068 | ||
1068 | llc->k -= unacked_pdu; | 1069 | if (llc->k - unacked_pdu < 1) |
1069 | if (llc->k < 2) | 1070 | llc->k = 1; |
1070 | llc->k = 2; | 1071 | else |
1072 | llc->k -= unacked_pdu; | ||
1071 | return 0; | 1073 | return 0; |
1072 | } | 1074 | } |
1073 | 1075 | ||
@@ -1084,8 +1086,8 @@ int llc_conn_ac_inc_tx_win_size(struct sock *sk, struct sk_buff *skb) | |||
1084 | struct llc_sock *llc = llc_sk(sk); | 1086 | struct llc_sock *llc = llc_sk(sk); |
1085 | 1087 | ||
1086 | llc->k += 1; | 1088 | llc->k += 1; |
1087 | if (llc->k > 128) | 1089 | if (llc->k > ~LLC_2_SEQ_NBR_MODULO) |
1088 | llc->k = 128 ; | 1090 | llc->k = ~LLC_2_SEQ_NBR_MODULO ; |
1089 | return 0; | 1091 | return 0; |
1090 | } | 1092 | } |
1091 | 1093 | ||
@@ -1309,7 +1311,7 @@ int llc_conn_ac_set_vs_nr(struct sock *sk, struct sk_buff *skb) | |||
1309 | 1311 | ||
1310 | static int llc_conn_ac_inc_vs_by_1(struct sock *sk, struct sk_buff *skb) | 1312 | static int llc_conn_ac_inc_vs_by_1(struct sock *sk, struct sk_buff *skb) |
1311 | { | 1313 | { |
1312 | llc_sk(sk)->vS = (llc_sk(sk)->vS + 1) % 128; | 1314 | llc_sk(sk)->vS = (llc_sk(sk)->vS + 1) % LLC_2_SEQ_NBR_MODULO; |
1313 | return 0; | 1315 | return 0; |
1314 | } | 1316 | } |
1315 | 1317 | ||
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 9a67c796b385..ea094b231d62 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -1395,6 +1395,13 @@ void nf_conntrack_cleanup(void) | |||
1395 | kmem_cache_destroy(nf_conntrack_expect_cachep); | 1395 | kmem_cache_destroy(nf_conntrack_expect_cachep); |
1396 | free_conntrack_hash(nf_conntrack_hash, nf_conntrack_vmalloc, | 1396 | free_conntrack_hash(nf_conntrack_hash, nf_conntrack_vmalloc, |
1397 | nf_conntrack_htable_size); | 1397 | nf_conntrack_htable_size); |
1398 | |||
1399 | /* free l3proto protocol tables */ | ||
1400 | for (i = 0; i < PF_MAX; i++) | ||
1401 | if (nf_ct_protos[i]) { | ||
1402 | kfree(nf_ct_protos[i]); | ||
1403 | nf_ct_protos[i] = NULL; | ||
1404 | } | ||
1398 | } | 1405 | } |
1399 | 1406 | ||
1400 | static struct list_head *alloc_hashtable(int size, int *vmalloced) | 1407 | static struct list_head *alloc_hashtable(int size, int *vmalloced) |
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 45224db4fe2f..5af381f9fe3d 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -694,7 +694,7 @@ static int init_or_cleanup(int init) | |||
694 | cleanup_proc_stat: | 694 | cleanup_proc_stat: |
695 | #endif | 695 | #endif |
696 | #ifdef CONFIG_PROC_FS | 696 | #ifdef CONFIG_PROC_FS |
697 | proc_net_remove("nf_conntrack_stat"); | 697 | remove_proc_entry("nf_conntrack", proc_net_stat); |
698 | cleanup_proc_exp: | 698 | cleanup_proc_exp: |
699 | proc_net_remove("nf_conntrack_expect"); | 699 | proc_net_remove("nf_conntrack_expect"); |
700 | cleanup_proc: | 700 | cleanup_proc: |