diff options
Diffstat (limited to 'net/ipv4')
| -rw-r--r-- | net/ipv4/ip_input.c | 10 | ||||
| -rw-r--r-- | net/ipv4/tcp_htcp.c | 14 |
2 files changed, 19 insertions, 5 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 70bedab03b09..1a58a6fa1dc0 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
| @@ -209,9 +209,17 @@ static int ip_local_deliver_finish(struct sk_buff *skb) | |||
| 209 | 209 | ||
| 210 | hash = protocol & (MAX_INET_PROTOS - 1); | 210 | hash = protocol & (MAX_INET_PROTOS - 1); |
| 211 | ipprot = rcu_dereference(inet_protos[hash]); | 211 | ipprot = rcu_dereference(inet_protos[hash]); |
| 212 | if (ipprot != NULL && (net == &init_net || ipprot->netns_ok)) { | 212 | if (ipprot != NULL) { |
| 213 | int ret; | 213 | int ret; |
| 214 | 214 | ||
| 215 | if (!net_eq(net, &init_net) && !ipprot->netns_ok) { | ||
| 216 | if (net_ratelimit()) | ||
| 217 | printk("%s: proto %d isn't netns-ready\n", | ||
| 218 | __func__, protocol); | ||
| 219 | kfree_skb(skb); | ||
| 220 | goto out; | ||
| 221 | } | ||
| 222 | |||
| 215 | if (!ipprot->no_policy) { | 223 | if (!ipprot->no_policy) { |
| 216 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 224 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
| 217 | kfree_skb(skb); | 225 | kfree_skb(skb); |
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c index af99776146ff..937549b8a921 100644 --- a/net/ipv4/tcp_htcp.c +++ b/net/ipv4/tcp_htcp.c | |||
| @@ -69,9 +69,12 @@ static u32 htcp_cwnd_undo(struct sock *sk) | |||
| 69 | const struct tcp_sock *tp = tcp_sk(sk); | 69 | const struct tcp_sock *tp = tcp_sk(sk); |
| 70 | struct htcp *ca = inet_csk_ca(sk); | 70 | struct htcp *ca = inet_csk_ca(sk); |
| 71 | 71 | ||
| 72 | ca->last_cong = ca->undo_last_cong; | 72 | if (ca->undo_last_cong) { |
| 73 | ca->maxRTT = ca->undo_maxRTT; | 73 | ca->last_cong = ca->undo_last_cong; |
| 74 | ca->old_maxB = ca->undo_old_maxB; | 74 | ca->maxRTT = ca->undo_maxRTT; |
| 75 | ca->old_maxB = ca->undo_old_maxB; | ||
| 76 | ca->undo_last_cong = 0; | ||
| 77 | } | ||
| 75 | 78 | ||
| 76 | return max(tp->snd_cwnd, (tp->snd_ssthresh << 7) / ca->beta); | 79 | return max(tp->snd_cwnd, (tp->snd_ssthresh << 7) / ca->beta); |
| 77 | } | 80 | } |
| @@ -268,7 +271,10 @@ static void htcp_state(struct sock *sk, u8 new_state) | |||
| 268 | case TCP_CA_Open: | 271 | case TCP_CA_Open: |
| 269 | { | 272 | { |
| 270 | struct htcp *ca = inet_csk_ca(sk); | 273 | struct htcp *ca = inet_csk_ca(sk); |
| 271 | ca->last_cong = jiffies; | 274 | if (ca->undo_last_cong) { |
| 275 | ca->last_cong = jiffies; | ||
| 276 | ca->undo_last_cong = 0; | ||
| 277 | } | ||
| 272 | } | 278 | } |
| 273 | break; | 279 | break; |
| 274 | case TCP_CA_CWR: | 280 | case TCP_CA_CWR: |
