From: Maxim Levitsky <maximlevitsky@gmail.com>
To: linux1394-devel <linux1394-devel@lists.sourceforge.net>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>,
netdev@vger.kernel.org, Maxim Levitsky <maximlevitsky@gmail.com>
Subject: [PATCH 4/5] firewire: net: invalidate ARP entries for removed nodes.
Date: Sun, 28 Nov 2010 03:15:35 +0200 [thread overview]
Message-ID: <1290906936-14472-5-git-send-email-maximlevitsky@gmail.com> (raw)
In-Reply-To: <1290906936-14472-1-git-send-email-maximlevitsky@gmail.com>
This allows to be able to connect to nodes that disappered
from the bus and after some time appeared again.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
drivers/firewire/net.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index 1a467a9..d422519 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -189,6 +189,7 @@ struct fwnet_peer {
struct fwnet_device *dev;
u64 guid;
u64 fifo;
+ __be32 ip;
/* guarded by dev->lock */
struct list_head pd_list; /* received partial datagrams */
@@ -568,6 +569,8 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
peer->speed = sspd;
if (peer->max_payload > max_payload)
peer->max_payload = max_payload;
+
+ peer->ip = arp1394->sip;
}
spin_unlock_irqrestore(&dev->lock, flags);
@@ -1443,6 +1446,7 @@ static int fwnet_add_peer(struct fwnet_device *dev,
peer->dev = dev;
peer->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4];
peer->fifo = FWNET_NO_FIFO_ADDR;
+ peer->ip = 0;
INIT_LIST_HEAD(&peer->pd_list);
peer->pdg_size = 0;
peer->datagram_label = 0;
@@ -1558,6 +1562,9 @@ static int fwnet_remove(struct device *_dev)
mutex_lock(&fwnet_device_mutex);
+ if (dev->netdev && peer->ip)
+ arp_invalidate(dev->netdev, peer->ip);
+
fwnet_remove_peer(peer);
if (list_empty(&dev->peer_list)) {
--
1.7.1
next prev parent reply other threads:[~2010-11-28 1:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-28 1:15 [PATCH 0/5] Firewire networking assorted fixes Maxim Levitsky
2010-11-28 1:15 ` [PATCH 1/5] firewire: ohci: restore GUID register on resume Maxim Levitsky
2010-11-28 1:15 ` [PATCH 2/5] firewire: ohci: restart ISO channels " Maxim Levitsky
2010-11-28 1:15 ` [PATCH 3/5] NET: ARP: allow to invalidate specific ARP entries Maxim Levitsky
2010-11-28 1:15 ` Maxim Levitsky [this message]
2010-11-28 1:15 ` [PATCH 5/5] firewire: net: ratelimit error messages Maxim Levitsky
2010-11-28 3:02 ` [PATCH 0/5] Firewire networking assorted fixes Maxim Levitsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1290906936-14472-5-git-send-email-maximlevitsky@gmail.com \
--to=maximlevitsky@gmail.com \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).