network ID: split NetlinkService::CalculateIDForFamily() into multiple methods
Categories
(Core :: Networking, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: michal, Assigned: sonakshisaxena1)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
NetlinkService::CalculateIDForFamily() is very long and hard to read. It should be split into multiple methods.
Assignee | ||
Comment 1•5 years ago
|
||
(In reply to Michal Novotny [:michal] from comment #0)
NetlinkService::CalculateIDForFamily() is very long and hard to read. It should be split into multiple methods.
Hey [:michal]
Can I take this up?
Thanks!
Reporter | ||
Comment 2•5 years ago
|
||
sure
Assignee | ||
Comment 3•5 years ago
|
||
Hey [:michal]
The following is my approach to this bug -
I made 3 new methods which offload the work that NetlinkService::CalculateIDForFamily() was doing.
1.GetGWNeighboursForFamily()
2.CalculateIDForEthernetLink()
3.CalculateIDForNonEthernetLink()
In CalculateIDForFamily(), we were getting an array of gateway neighbours for a particular address family, for which we know the MAC address. I off-loaded that part to GetGWNeighboursForFamily() method.
Then later on in CalculateIDForFamily(), depending on whether the traffic is routed through Ethernet or non-Ethernet device, we were calculating the NetworkID. So I moved those parts to CalculateIDForEthernetLink() and CalculateIDForNonEthernetLink().
I'm putting up a patch for this. Kindly review it.
Thanks!
Assignee | ||
Comment 4•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Michal Novotny [:michal] from comment #2)
sure
Hey Michal!
I have put up a patch for this. Can you please review it?
Thanks! :)
Comment 7•5 years ago
|
||
bugherder |
Description
•