File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed
Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
88name = " omnect-device-service"
99readme = " README.md"
1010repository = " https://github.com/omnect/omnect-device-service.git"
11- version = " 0.41.7 "
11+ version = " 0.41.8 "
1212
1313[dependencies ]
1414actix-server = { version = " 2.6" , default-features = false }
Original file line number Diff line number Diff line change @@ -364,6 +364,7 @@ pub mod mod_test {
364364 } ,
365365 "mac" : "50:2d:f4:35:16:25" ,
366366 "name" : "eth0" ,
367+ "file" : "/lib/systemd/network/80-wired.network" ,
367368 "online" : true
368369 } ,
369370 {
@@ -374,6 +375,7 @@ pub mod mod_test {
374375 } ,
375376 "mac" : "50:2d:f4:2c:0e:51" ,
376377 "name" : "eth1" ,
378+ "file" : "/lib/systemd/network/80-wired.network" ,
377379 "online" : false
378380 } ]
379381 }
@@ -512,6 +514,7 @@ pub mod mod_test {
512514 } ,
513515 "mac" : "50:2d:f4:35:16:25" ,
514516 "name" : "eth0" ,
517+ "file" : "/lib/systemd/network/80-wired.network" ,
515518 "online" : true
516519 } ,
517520 {
@@ -522,6 +525,7 @@ pub mod mod_test {
522525 } ,
523526 "mac" : "50:2d:f4:2c:0e:51" ,
524527 "name" : "eth1" ,
528+ "file" : "/lib/systemd/network/80-wired.network" ,
525529 "online" : false
526530 } ]
527531 }
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ pub struct Interface {
4343 name : String ,
4444 mac : String ,
4545 online : bool ,
46+ file : String ,
4647 ipv4 : IpConfig ,
4748}
4849
@@ -171,6 +172,10 @@ impl Network {
171172 error ! ( "parse_interfaces: skip interface ('OnlineState' missing)" ) ;
172173 continue ;
173174 } ;
175+ let Some ( file) = i[ "NetworkFile" ] . as_str ( ) else {
176+ error ! ( "parse_interfaces: skip interface ('NetworkFile' missing)" ) ;
177+ continue ;
178+ } ;
174179
175180 let Some ( mac) = Self :: parse_mac ( i, "HardwareAddress" ) else {
176181 continue ;
@@ -245,6 +250,7 @@ impl Network {
245250 name : name. to_string ( ) ,
246251 online : online. eq ( "online" ) ,
247252 mac,
253+ file : file. to_string ( ) ,
248254 ipv4,
249255 } ) ;
250256 }
You can’t perform that action at this time.
0 commit comments