diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/neighbour.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index c22def5ae486..2feda6e7a31d 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -720,15 +720,9 @@ EXPORT_SYMBOL(neigh_destroy); | |||
720 | */ | 720 | */ |
721 | static void neigh_suspect(struct neighbour *neigh) | 721 | static void neigh_suspect(struct neighbour *neigh) |
722 | { | 722 | { |
723 | struct hh_cache *hh; | ||
724 | |||
725 | NEIGH_PRINTK2("neigh %p is suspected.\n", neigh); | 723 | NEIGH_PRINTK2("neigh %p is suspected.\n", neigh); |
726 | 724 | ||
727 | neigh->output = neigh->ops->output; | 725 | neigh->output = neigh->ops->output; |
728 | |||
729 | hh = &neigh->hh; | ||
730 | if (hh->hh_len) | ||
731 | hh->hh_output = neigh->ops->output; | ||
732 | } | 726 | } |
733 | 727 | ||
734 | /* Neighbour state is OK; | 728 | /* Neighbour state is OK; |
@@ -738,15 +732,9 @@ static void neigh_suspect(struct neighbour *neigh) | |||
738 | */ | 732 | */ |
739 | static void neigh_connect(struct neighbour *neigh) | 733 | static void neigh_connect(struct neighbour *neigh) |
740 | { | 734 | { |
741 | struct hh_cache *hh; | ||
742 | |||
743 | NEIGH_PRINTK2("neigh %p is connected.\n", neigh); | 735 | NEIGH_PRINTK2("neigh %p is connected.\n", neigh); |
744 | 736 | ||
745 | neigh->output = neigh->ops->connected_output; | 737 | neigh->output = neigh->ops->connected_output; |
746 | |||
747 | hh = &neigh->hh; | ||
748 | if (hh->hh_len) | ||
749 | hh->hh_output = dev_queue_xmit; | ||
750 | } | 738 | } |
751 | 739 | ||
752 | static void neigh_periodic_work(struct work_struct *work) | 740 | static void neigh_periodic_work(struct work_struct *work) |
@@ -1215,18 +1203,9 @@ static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst) | |||
1215 | /* Only one thread can come in here and initialize the | 1203 | /* Only one thread can come in here and initialize the |
1216 | * hh_cache entry. | 1204 | * hh_cache entry. |
1217 | */ | 1205 | */ |
1218 | if (hh->hh_len) | 1206 | if (!hh->hh_len) |
1219 | goto end; | 1207 | dev->header_ops->cache(n, hh, prot); |
1220 | |||
1221 | if (dev->header_ops->cache(n, hh, prot)) | ||
1222 | goto end; | ||
1223 | |||
1224 | if (n->nud_state & NUD_CONNECTED) | ||
1225 | hh->hh_output = dev_queue_xmit; | ||
1226 | else | ||
1227 | hh->hh_output = n->ops->output; | ||
1228 | 1208 | ||
1229 | end: | ||
1230 | write_unlock_bh(&n->lock); | 1209 | write_unlock_bh(&n->lock); |
1231 | } | 1210 | } |
1232 | 1211 | ||