Skip to content

Commit

Permalink
rose: Set the destination address in rose_header
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Signed-off-by: "Eric W. Biederman" <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ebiederm authored and davem330 committed Mar 2, 2015
1 parent e18dbd0 commit b753af3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/rose/rose_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b753af3

Please sign in to comment.