Commit c40f502
committed
CFE-3046: Only add unique IPv4 interfaces to sys.interfaces
Previously, when an interface had multiple IPv4 addresses set, the parsing of
these addresses would add the interface to the sys.interfaces and sys.hardware
variables multiple times, resulting in the interface showing up as a duplicate
in the list.
This fix makes sure that an interface is only added once for every interface
type, regardless of how many IPv4 addresses the interface contains.
Changelog: Fixed an issue causing duplicate entries in sys.interfaces, and
sys.hardware.
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>1 parent b66d8ec commit c40f502
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| 413 | + | |
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
| 418 | + | |
417 | 419 | | |
418 | 420 | | |
419 | 421 | | |
| |||
549 | 551 | | |
550 | 552 | | |
551 | 553 | | |
552 | | - | |
553 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
554 | 560 | | |
555 | 561 | | |
556 | 562 | | |
| |||
0 commit comments