diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-03-09 04:38:55 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-03-09 04:38:59 -0500 |
| commit | c8b44163b754612fc4769fe1c5df00e98fc9d3c6 (patch) | |
| tree | 77706ff1f2a72ed294885b6cf0a7c0de0f92d6df /net/ipv4 | |
| parent | ac23f25355ef53f3d14352fcff3c6817527a9749 (diff) | |
| parent | a5abba989deceb731047425812d268daf7536575 (diff) | |
Merge commit 'v2.6.38-rc8' into x86/asm
Merge reason: Update with the latest fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/ipv4')
| -rw-r--r-- | net/ipv4/devinet.c | 30 | ||||
| -rw-r--r-- | net/ipv4/inet_timewait_sock.c | 2 | ||||
| -rw-r--r-- | net/ipv4/ip_gre.c | 1 | ||||
| -rw-r--r-- | net/ipv4/route.c | 1 | ||||
| -rw-r--r-- | net/ipv4/tcp_input.c | 5 | ||||
| -rw-r--r-- | net/ipv4/tcp_output.c | 2 |
6 files changed, 28 insertions, 13 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 748cb5b337bd..df4616fce929 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
| @@ -1030,6 +1030,21 @@ static inline bool inetdev_valid_mtu(unsigned mtu) | |||
| 1030 | return mtu >= 68; | 1030 | return mtu >= 68; |
| 1031 | } | 1031 | } |
| 1032 | 1032 | ||
| 1033 | static void inetdev_send_gratuitous_arp(struct net_device *dev, | ||
| 1034 | struct in_device *in_dev) | ||
| 1035 | |||
| 1036 | { | ||
| 1037 | struct in_ifaddr *ifa = in_dev->ifa_list; | ||
| 1038 | |||
| 1039 | if (!ifa) | ||
| 1040 | return; | ||
| 1041 | |||
| 1042 | arp_send(ARPOP_REQUEST, ETH_P_ARP, | ||
| 1043 | ifa->ifa_address, dev, | ||
| 1044 | ifa->ifa_address, NULL, | ||
| 1045 | dev->dev_addr, NULL); | ||
| 1046 | } | ||
| 1047 | |||
| 1033 | /* Called only under RTNL semaphore */ | 1048 | /* Called only under RTNL semaphore */ |
| 1034 | 1049 | ||
| 1035 | static int inetdev_event(struct notifier_block *this, unsigned long event, | 1050 | static int inetdev_event(struct notifier_block *this, unsigned long event, |
| @@ -1082,18 +1097,13 @@ static int inetdev_event(struct notifier_block *this, unsigned long event, | |||
| 1082 | } | 1097 | } |
| 1083 | ip_mc_up(in_dev); | 1098 | ip_mc_up(in_dev); |
| 1084 | /* fall through */ | 1099 | /* fall through */ |
| 1085 | case NETDEV_NOTIFY_PEERS: | ||
| 1086 | case NETDEV_CHANGEADDR: | 1100 | case NETDEV_CHANGEADDR: |
| 1101 | if (!IN_DEV_ARP_NOTIFY(in_dev)) | ||
| 1102 | break; | ||
| 1103 | /* fall through */ | ||
| 1104 | case NETDEV_NOTIFY_PEERS: | ||
| 1087 | /* Send gratuitous ARP to notify of link change */ | 1105 | /* Send gratuitous ARP to notify of link change */ |
| 1088 | if (IN_DEV_ARP_NOTIFY(in_dev)) { | 1106 | inetdev_send_gratuitous_arp(dev, in_dev); |
| 1089 | struct in_ifaddr *ifa = in_dev->ifa_list; | ||
| 1090 | |||
| 1091 | if (ifa) | ||
| 1092 | arp_send(ARPOP_REQUEST, ETH_P_ARP, | ||
| 1093 | ifa->ifa_address, dev, | ||
| 1094 | ifa->ifa_address, NULL, | ||
| 1095 | dev->dev_addr, NULL); | ||
| 1096 | } | ||
| 1097 | break; | 1107 | break; |
| 1098 | case NETDEV_DOWN: | 1108 | case NETDEV_DOWN: |
| 1099 | ip_mc_down(in_dev); | 1109 | ip_mc_down(in_dev); |
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index c5af909cf701..3c8dfa16614d 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
| @@ -505,7 +505,9 @@ restart: | |||
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | rcu_read_unlock(); | 507 | rcu_read_unlock(); |
| 508 | local_bh_disable(); | ||
| 508 | inet_twsk_deschedule(tw, twdr); | 509 | inet_twsk_deschedule(tw, twdr); |
| 510 | local_bh_enable(); | ||
| 509 | inet_twsk_put(tw); | 511 | inet_twsk_put(tw); |
| 510 | goto restart_rcu; | 512 | goto restart_rcu; |
| 511 | } | 513 | } |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index eb68a0e34e49..6613edfac28c 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
| @@ -775,6 +775,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev | |||
| 775 | .fl4_dst = dst, | 775 | .fl4_dst = dst, |
| 776 | .fl4_src = tiph->saddr, | 776 | .fl4_src = tiph->saddr, |
| 777 | .fl4_tos = RT_TOS(tos), | 777 | .fl4_tos = RT_TOS(tos), |
| 778 | .proto = IPPROTO_GRE, | ||
| 778 | .fl_gre_key = tunnel->parms.o_key | 779 | .fl_gre_key = tunnel->parms.o_key |
| 779 | }; | 780 | }; |
| 780 | if (ip_route_output_key(dev_net(dev), &rt, &fl)) { | 781 | if (ip_route_output_key(dev_net(dev), &rt, &fl)) { |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 788a3e74834e..6ed6603c2f6d 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
| @@ -2722,6 +2722,7 @@ static struct dst_ops ipv4_dst_blackhole_ops = { | |||
| 2722 | .destroy = ipv4_dst_destroy, | 2722 | .destroy = ipv4_dst_destroy, |
| 2723 | .check = ipv4_blackhole_dst_check, | 2723 | .check = ipv4_blackhole_dst_check, |
| 2724 | .default_mtu = ipv4_blackhole_default_mtu, | 2724 | .default_mtu = ipv4_blackhole_default_mtu, |
| 2725 | .default_advmss = ipv4_default_advmss, | ||
| 2725 | .update_pmtu = ipv4_rt_blackhole_update_pmtu, | 2726 | .update_pmtu = ipv4_rt_blackhole_update_pmtu, |
| 2726 | }; | 2727 | }; |
| 2727 | 2728 | ||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index eb7f82ebf4a3..65f6c0406245 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
| @@ -1222,7 +1222,7 @@ static int tcp_check_dsack(struct sock *sk, struct sk_buff *ack_skb, | |||
| 1222 | } | 1222 | } |
| 1223 | 1223 | ||
| 1224 | /* D-SACK for already forgotten data... Do dumb counting. */ | 1224 | /* D-SACK for already forgotten data... Do dumb counting. */ |
| 1225 | if (dup_sack && | 1225 | if (dup_sack && tp->undo_marker && tp->undo_retrans && |
| 1226 | !after(end_seq_0, prior_snd_una) && | 1226 | !after(end_seq_0, prior_snd_una) && |
| 1227 | after(end_seq_0, tp->undo_marker)) | 1227 | after(end_seq_0, tp->undo_marker)) |
| 1228 | tp->undo_retrans--; | 1228 | tp->undo_retrans--; |
| @@ -1299,7 +1299,8 @@ static u8 tcp_sacktag_one(struct sk_buff *skb, struct sock *sk, | |||
| 1299 | 1299 | ||
| 1300 | /* Account D-SACK for retransmitted packet. */ | 1300 | /* Account D-SACK for retransmitted packet. */ |
| 1301 | if (dup_sack && (sacked & TCPCB_RETRANS)) { | 1301 | if (dup_sack && (sacked & TCPCB_RETRANS)) { |
| 1302 | if (after(TCP_SKB_CB(skb)->end_seq, tp->undo_marker)) | 1302 | if (tp->undo_marker && tp->undo_retrans && |
| 1303 | after(TCP_SKB_CB(skb)->end_seq, tp->undo_marker)) | ||
| 1303 | tp->undo_retrans--; | 1304 | tp->undo_retrans--; |
| 1304 | if (sacked & TCPCB_SACKED_ACKED) | 1305 | if (sacked & TCPCB_SACKED_ACKED) |
| 1305 | state->reord = min(fack_count, state->reord); | 1306 | state->reord = min(fack_count, state->reord); |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 406f320336e6..dfa5beb0c1c8 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
| @@ -2162,7 +2162,7 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
| 2162 | if (!tp->retrans_stamp) | 2162 | if (!tp->retrans_stamp) |
| 2163 | tp->retrans_stamp = TCP_SKB_CB(skb)->when; | 2163 | tp->retrans_stamp = TCP_SKB_CB(skb)->when; |
| 2164 | 2164 | ||
| 2165 | tp->undo_retrans++; | 2165 | tp->undo_retrans += tcp_skb_pcount(skb); |
| 2166 | 2166 | ||
| 2167 | /* snd_nxt is stored to detect loss of retransmitted segment, | 2167 | /* snd_nxt is stored to detect loss of retransmitted segment, |
| 2168 | * see tcp_input.c tcp_sacktag_write_queue(). | 2168 | * see tcp_input.c tcp_sacktag_write_queue(). |
