aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-10-27 19:12:49 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-10-27 19:12:49 -0400
commit4c2cb58c552a34744979a99ccf01762d5eb7e288 (patch)
treefd35360eb0cb08b07f3a5f4bdf1ebd90a769311d /net/core
parent34123da66e613602de5a886b05c875b6a91b8ed2 (diff)
parent72ab373a5688a78cbdaf3bf96012e597d5399bb7 (diff)
Merge /home/trondmy/scm/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c48
-rw-r--r--net/core/skbuff.c6
-rw-r--r--net/core/wireless.c9
3 files changed, 29 insertions, 34 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 4128fc76ac3..1dcf7fa1f0f 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -175,39 +175,10 @@ static void pneigh_queue_purge(struct sk_buff_head *list)
175 } 175 }
176} 176}
177 177
178void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev) 178static void neigh_flush_dev(struct neigh_table *tbl, struct net_device *dev)
179{ 179{
180 int i; 180 int i;
181 181
182 write_lock_bh(&tbl->lock);
183
184 for (i=0; i <= tbl->hash_mask; i++) {
185 struct neighbour *n, **np;
186
187 np = &tbl->hash_buckets[i];
188 while ((n = *np) != NULL) {
189 if (dev && n->dev != dev) {
190 np = &n->next;
191 continue;
192 }
193 *np = n->next;
194 write_lock_bh(&n->lock);
195 n->dead = 1;
196 neigh_del_timer(n);
197 write_unlock_bh(&n->lock);
198 neigh_release(n);
199 }
200 }
201
202 write_unlock_bh(&tbl->lock);
203}
204
205int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
206{
207 int i;
208
209 write_lock_bh(&tbl->lock);
210
211 for (i = 0; i <= tbl->hash_mask; i++) { 182 for (i = 0; i <= tbl->hash_mask; i++) {
212 struct neighbour *n, **np = &tbl->hash_buckets[i]; 183 struct neighbour *n, **np = &tbl->hash_buckets[i];
213 184
@@ -243,7 +214,19 @@ int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
243 neigh_release(n); 214 neigh_release(n);
244 } 215 }
245 } 216 }
217}
246 218
219void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev)
220{
221 write_lock_bh(&tbl->lock);
222 neigh_flush_dev(tbl, dev);
223 write_unlock_bh(&tbl->lock);
224}
225
226int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
227{
228 write_lock_bh(&tbl->lock);
229 neigh_flush_dev(tbl, dev);
247 pneigh_ifdown(tbl, dev); 230 pneigh_ifdown(tbl, dev);
248 write_unlock_bh(&tbl->lock); 231 write_unlock_bh(&tbl->lock);
249 232
@@ -732,6 +715,7 @@ static inline void neigh_add_timer(struct neighbour *n, unsigned long when)
732 if (unlikely(mod_timer(&n->timer, when))) { 715 if (unlikely(mod_timer(&n->timer, when))) {
733 printk("NEIGH: BUG, double timer add, state is %x\n", 716 printk("NEIGH: BUG, double timer add, state is %x\n",
734 n->nud_state); 717 n->nud_state);
718 dump_stack();
735 } 719 }
736} 720}
737 721
@@ -815,10 +799,10 @@ static void neigh_timer_handler(unsigned long arg)
815 } 799 }
816 800
817 if (neigh->nud_state & NUD_IN_TIMER) { 801 if (neigh->nud_state & NUD_IN_TIMER) {
818 neigh_hold(neigh);
819 if (time_before(next, jiffies + HZ/2)) 802 if (time_before(next, jiffies + HZ/2))
820 next = jiffies + HZ/2; 803 next = jiffies + HZ/2;
821 neigh_add_timer(neigh, next); 804 if (!mod_timer(&neigh->timer, next))
805 neigh_hold(neigh);
822 } 806 }
823 if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) { 807 if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) {
824 struct sk_buff *skb = skb_peek(&neigh->arp_queue); 808 struct sk_buff *skb = skb_peek(&neigh->arp_queue);
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index af9b1516e21..02cd4cde211 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -410,6 +410,9 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
410 C(nfct); 410 C(nfct);
411 nf_conntrack_get(skb->nfct); 411 nf_conntrack_get(skb->nfct);
412 C(nfctinfo); 412 C(nfctinfo);
413#if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
414 C(ipvs_property);
415#endif
413#ifdef CONFIG_BRIDGE_NETFILTER 416#ifdef CONFIG_BRIDGE_NETFILTER
414 C(nf_bridge); 417 C(nf_bridge);
415 nf_bridge_get(skb->nf_bridge); 418 nf_bridge_get(skb->nf_bridge);
@@ -467,6 +470,9 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
467 new->nfct = old->nfct; 470 new->nfct = old->nfct;
468 nf_conntrack_get(old->nfct); 471 nf_conntrack_get(old->nfct);
469 new->nfctinfo = old->nfctinfo; 472 new->nfctinfo = old->nfctinfo;
473#if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
474 new->ipvs_property = old->ipvs_property;
475#endif
470#ifdef CONFIG_BRIDGE_NETFILTER 476#ifdef CONFIG_BRIDGE_NETFILTER
471 new->nf_bridge = old->nf_bridge; 477 new->nf_bridge = old->nf_bridge;
472 nf_bridge_get(old->nf_bridge); 478 nf_bridge_get(old->nf_bridge);
diff --git a/net/core/wireless.c b/net/core/wireless.c
index d17f1583ea3..271ddb35b0b 100644
--- a/net/core/wireless.c
+++ b/net/core/wireless.c
@@ -455,10 +455,15 @@ static inline struct iw_statistics *get_wireless_stats(struct net_device *dev)
455 455
456 /* Old location, field to be removed in next WE */ 456 /* Old location, field to be removed in next WE */
457 if(dev->get_wireless_stats) { 457 if(dev->get_wireless_stats) {
458 printk(KERN_DEBUG "%s (WE) : Driver using old /proc/net/wireless support, please fix driver !\n", 458 static int printed_message;
459 dev->name); 459
460 if (!printed_message++)
461 printk(KERN_DEBUG "%s (WE) : Driver using old /proc/net/wireless support, please fix driver !\n",
462 dev->name);
463
460 return dev->get_wireless_stats(dev); 464 return dev->get_wireless_stats(dev);
461 } 465 }
466
462 /* Not found */ 467 /* Not found */
463 return (struct iw_statistics *) NULL; 468 return (struct iw_statistics *) NULL;
464} 469}