diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-03-02 07:01:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-02 22:43:39 +0100 |
commit | b753af31abe416b19830d5ac7f8da6c16f165214 (patch) | |
tree | 3e8ecfae46207e6fbcd7549b64f08ce19574b406 /net/rose | |
parent | ax25: In ax25_rebuild_header add missing kfree_skb (diff) | |
download | linux-b753af31abe416b19830d5ac7f8da6c16f165214.tar.xz linux-b753af31abe416b19830d5ac7f8da6c16f165214.zip |
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 50005888be57..24d2b40b6c6b 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; |