aboutsummaryrefslogtreecommitdiffstats
path: root/net/rose
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-03-02 01:01:30 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-02 16:43:39 -0500
commitb753af31abe416b19830d5ac7f8da6c16f165214 (patch)
tree3e8ecfae46207e6fbcd7549b64f08ce19574b406 /net/rose
parente18dbd059319ac8d3fc0a0a23f6a8abcb9a59a31 (diff)
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.c3
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,
41{ 41{
42 unsigned char *buff = skb_push(skb, ROSE_MIN_LEN + 2); 42 unsigned char *buff = skb_push(skb, ROSE_MIN_LEN + 2);
43 43
44 if (daddr)
45 memcpy(buff + 7, daddr, dev->addr_len);
46
44 *buff++ = ROSE_GFI | ROSE_Q_BIT; 47 *buff++ = ROSE_GFI | ROSE_Q_BIT;
45 *buff++ = 0x00; 48 *buff++ = 0x00;
46 *buff++ = ROSE_DATA; 49 *buff++ = ROSE_DATA;