diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-03-02 00:01:30 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-02 16:43:39 -0500 |
commit | b753af31abe416b19830d5ac7f8da6c16f165214 (patch) | |
tree | 3e8ecfae46207e6fbcd7549b64f08ce19574b406 /net/rose | |
parent | e18dbd059319ac8d3fc0a0a23f6a8abcb9a59a31 (diff) | |
download | op-kernel-dev-b753af31abe416b19830d5ac7f8da6c16f165214.zip op-kernel-dev-b753af31abe416b19830d5ac7f8da6c16f165214.tar.gz |
rose: Set the destination address in rose_header
Not setting the destination address is a bug that I suspect causes no
problems today, as only the arp code seems to call dev_hard_header and
the description I have of rose is that it is expected to be used with a
static neigbour table.
I have derived the offset and the length of the rose destination address
from rose_rebuild_header where arp_find calls neigh_ha_snapshot to set
the destination address.
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-hams@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rose')
-rw-r--r-- | net/rose/rose_dev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c index 5000588..24d2b40 100644 --- a/net/rose/rose_dev.c +++ b/net/rose/rose_dev.c @@ -41,6 +41,9 @@ static int rose_header(struct sk_buff *skb, struct net_device *dev, { unsigned char *buff = skb_push(skb, ROSE_MIN_LEN + 2); + if (daddr) + memcpy(buff + 7, daddr, dev->addr_len); + *buff++ = ROSE_GFI | ROSE_Q_BIT; *buff++ = 0x00; *buff++ = ROSE_DATA; |