diff options
-rw-r--r-- | net/core/neighbour.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 3de654256028..2237c1b3cdd2 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -957,6 +957,8 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) | |||
957 | rc = 0; | 957 | rc = 0; |
958 | if (neigh->nud_state & (NUD_CONNECTED | NUD_DELAY | NUD_PROBE)) | 958 | if (neigh->nud_state & (NUD_CONNECTED | NUD_DELAY | NUD_PROBE)) |
959 | goto out_unlock_bh; | 959 | goto out_unlock_bh; |
960 | if (neigh->dead) | ||
961 | goto out_dead; | ||
960 | 962 | ||
961 | if (!(neigh->nud_state & (NUD_STALE | NUD_INCOMPLETE))) { | 963 | if (!(neigh->nud_state & (NUD_STALE | NUD_INCOMPLETE))) { |
962 | if (NEIGH_VAR(neigh->parms, MCAST_PROBES) + | 964 | if (NEIGH_VAR(neigh->parms, MCAST_PROBES) + |
@@ -1013,6 +1015,13 @@ out_unlock_bh: | |||
1013 | write_unlock(&neigh->lock); | 1015 | write_unlock(&neigh->lock); |
1014 | local_bh_enable(); | 1016 | local_bh_enable(); |
1015 | return rc; | 1017 | return rc; |
1018 | |||
1019 | out_dead: | ||
1020 | if (neigh->nud_state & NUD_STALE) | ||
1021 | goto out_unlock_bh; | ||
1022 | write_unlock_bh(&neigh->lock); | ||
1023 | kfree_skb(skb); | ||
1024 | return 1; | ||
1016 | } | 1025 | } |
1017 | EXPORT_SYMBOL(__neigh_event_send); | 1026 | EXPORT_SYMBOL(__neigh_event_send); |
1018 | 1027 | ||
@@ -1076,6 +1085,8 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | |||
1076 | if (!(flags & NEIGH_UPDATE_F_ADMIN) && | 1085 | if (!(flags & NEIGH_UPDATE_F_ADMIN) && |
1077 | (old & (NUD_NOARP | NUD_PERMANENT))) | 1086 | (old & (NUD_NOARP | NUD_PERMANENT))) |
1078 | goto out; | 1087 | goto out; |
1088 | if (neigh->dead) | ||
1089 | goto out; | ||
1079 | 1090 | ||
1080 | if (!(new & NUD_VALID)) { | 1091 | if (!(new & NUD_VALID)) { |
1081 | neigh_del_timer(neigh); | 1092 | neigh_del_timer(neigh); |
@@ -1225,6 +1236,8 @@ EXPORT_SYMBOL(neigh_update); | |||
1225 | */ | 1236 | */ |
1226 | void __neigh_set_probe_once(struct neighbour *neigh) | 1237 | void __neigh_set_probe_once(struct neighbour *neigh) |
1227 | { | 1238 | { |
1239 | if (neigh->dead) | ||
1240 | return; | ||
1228 | neigh->updated = jiffies; | 1241 | neigh->updated = jiffies; |
1229 | if (!(neigh->nud_state & NUD_FAILED)) | 1242 | if (!(neigh->nud_state & NUD_FAILED)) |
1230 | return; | 1243 | return; |