Skip to content

Commit

Permalink
print BOOTREPLY on bootp reply
Browse files Browse the repository at this point in the history
  • Loading branch information
leshow committed Jun 13, 2023
1 parent 140dfdc commit d959d8f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,12 @@ pub mod util {
impl Msg {
pub fn get_type(&self) -> String {
match self {
Msg::V4(m) => format!(
"{:?}",
m.opts()
.msg_type()
.map(|m| format!("{m:?}").to_uppercase())
.unwrap_or("bootreq".to_owned())
),
Msg::V4(m) => m
.opts()
.msg_type()
.map(|m| format!("{m:?}"))
.unwrap_or(format!("{:?}", m.opcode()))
.to_uppercase(),
Msg::V6(m) => format!("{:?}", m.opts()),
}
}
Expand Down

0 comments on commit d959d8f

Please sign in to comment.