Project

General

Profile

Bug #10411

loader: dev_net: correct net_open's interpretation of params

Added by Toomas Soome 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
2019-02-16
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

https://reviews.freebsd.org/D19206

net_open previously casted the first vararg to a char * and this was half-OK: at first, it is passed to netif_open, which would cast it back to the struct devdesc * that it really is and use it properly. It is then strdup()d and used as the netdev_name, which is objectively wrong.

Correct it so that the first vararg is properly casted to a struct devdesc * and the netdev_name gets set properly to make it more clear at a glance that it's not doing something horribly wrong.

History

#1

Updated by Electric Monk 10 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit ca4fa6c7dc905e230456873476b8eef017660b93

commit  ca4fa6c7dc905e230456873476b8eef017660b93
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-18T17:56:37.000Z

    10411 loader: dev_net: correct net_open's interpretation of params
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF