aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-02-19 22:17:35 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-19 22:17:35 -0500
commitda935c66bacb3ed9ada984b053297f87c2dff63a (patch)
tree46278da2b312c73f1375b830d7e5912bf23abd78 /net/ipv4
parent9435eb1cf0b76b323019cebf8d16762a50a12a19 (diff)
parent2205a6ea93fea76f88b43727fea53f3ce3790d6f (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: Documentation/feature-removal-schedule.txt drivers/net/e1000e/netdev.c net/xfrm/xfrm_policy.c
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/devinet.c30
-rw-r--r--net/ipv4/inet_timewait_sock.c2
-rw-r--r--net/ipv4/ip_gre.c1
-rw-r--r--net/ipv4/route.c1
4 files changed, 24 insertions, 10 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index ee144a4fca41..90389281d97a 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1102,6 +1102,21 @@ static inline bool inetdev_valid_mtu(unsigned mtu)
1102 return mtu >= 68; 1102 return mtu >= 68;
1103} 1103}
1104 1104
1105static void inetdev_send_gratuitous_arp(struct net_device *dev,
1106 struct in_device *in_dev)
1107
1108{
1109 struct in_ifaddr *ifa = in_dev->ifa_list;
1110
1111 if (!ifa)
1112 return;
1113
1114 arp_send(ARPOP_REQUEST, ETH_P_ARP,
1115 ifa->ifa_address, dev,
1116 ifa->ifa_address, NULL,
1117 dev->dev_addr, NULL);
1118}
1119
1105/* Called only under RTNL semaphore */ 1120/* Called only under RTNL semaphore */
1106 1121
1107static int inetdev_event(struct notifier_block *this, unsigned long event, 1122static int inetdev_event(struct notifier_block *this, unsigned long event,
@@ -1155,18 +1170,13 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
1155 } 1170 }
1156 ip_mc_up(in_dev); 1171 ip_mc_up(in_dev);
1157 /* fall through */ 1172 /* fall through */
1158 case NETDEV_NOTIFY_PEERS:
1159 case NETDEV_CHANGEADDR: 1173 case NETDEV_CHANGEADDR:
1174 if (!IN_DEV_ARP_NOTIFY(in_dev))
1175 break;
1176 /* fall through */
1177 case NETDEV_NOTIFY_PEERS:
1160 /* Send gratuitous ARP to notify of link change */ 1178 /* Send gratuitous ARP to notify of link change */
1161 if (IN_DEV_ARP_NOTIFY(in_dev)) { 1179 inetdev_send_gratuitous_arp(dev, in_dev);
1162 struct in_ifaddr *ifa = in_dev->ifa_list;
1163
1164 if (ifa)
1165 arp_send(ARPOP_REQUEST, ETH_P_ARP,
1166 ifa->ifa_address, dev,
1167 ifa->ifa_address, NULL,
1168 dev->dev_addr, NULL);
1169 }
1170 break; 1180 break;
1171 case NETDEV_DOWN: 1181 case NETDEV_DOWN:
1172 ip_mc_down(in_dev); 1182 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 2facde0985f9..52b077d45208 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2671,6 +2671,7 @@ static struct dst_ops ipv4_dst_blackhole_ops = {
2671 .destroy = ipv4_dst_destroy, 2671 .destroy = ipv4_dst_destroy,
2672 .check = ipv4_blackhole_dst_check, 2672 .check = ipv4_blackhole_dst_check,
2673 .default_mtu = ipv4_blackhole_default_mtu, 2673 .default_mtu = ipv4_blackhole_default_mtu,
2674 .default_advmss = ipv4_default_advmss,
2674 .update_pmtu = ipv4_rt_blackhole_update_pmtu, 2675 .update_pmtu = ipv4_rt_blackhole_update_pmtu,
2675}; 2676};
2676 2677