linsysfs: Use IfAPI accessors
Replace the only two ifnet member accesses with IfAPI accessor calls. Sponsored by: Juniper Networks, Inc.
This commit is contained in:
parent
5243598927
commit
c50f70b5a9
@ -116,7 +116,7 @@ linsysfs_ifnet_ifindex(PFS_FILL_ARGS)
|
||||
ifp = ifname_linux_to_bsd(td, pn->pn_parent->pn_name, NULL);
|
||||
if (ifp == NULL)
|
||||
return (ENOENT);
|
||||
sbuf_printf(sb, "%u\n", ifp->if_index);
|
||||
sbuf_printf(sb, "%u\n", if_getindex(ifp));
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ linsysfs_ifnet_mtu(PFS_FILL_ARGS)
|
||||
ifp = ifname_linux_to_bsd(td, pn->pn_parent->pn_name, NULL);
|
||||
if (ifp == NULL)
|
||||
return (ENOENT);
|
||||
sbuf_printf(sb, "%u\n", ifp->if_mtu);
|
||||
sbuf_printf(sb, "%u\n", if_getmtu(ifp));
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user