Skip to content

Commit

Permalink
Use 0 instead of 00000000 for MARK
Browse files Browse the repository at this point in the history
Otherwise it's hard to distinguish 00000000 from 08000000.

Signed-off-by: gray <gray.liang@isovalent.com>
  • Loading branch information
jschwinger233 authored and brb committed May 28, 2024
1 parent f06dd79 commit 05fe67e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/pwru/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (o *output) PrintHeader() {
fmt.Fprintf(o.writer, " %-16s", "TIMESTAMP")
}
if o.flags.OutputMeta {
fmt.Fprintf(o.writer, " %-10s %-8s %16s %-6s %-5s %-5s", "NETNS", "MARK", centerAlignString("IFACE", 16), "PROTO", "MTU", "LEN")
fmt.Fprintf(o.writer, " %-10s %-8s %16s %-6s %-5s %-5s", "NETNS", "MARK/x", centerAlignString("IFACE", 16), "PROTO", "MTU", "LEN")
}
if o.flags.OutputTuple {
fmt.Fprintf(o.writer, " %s", "TUPLE")
Expand Down Expand Up @@ -311,8 +311,9 @@ func getShinfoData(event *Event, o *output) (shinfoData string) {
}

func getMetaData(event *Event, o *output) (metaData string) {
metaData = fmt.Sprintf("%-10s %08x %16s %#04x %-5s %-5s",
fmt.Sprintf("%d", event.Meta.Netns), event.Meta.Mark,
metaData = fmt.Sprintf("%-10s %-8s %16s %#04x %-5s %-5s",
fmt.Sprintf("%d", event.Meta.Netns),
fmt.Sprintf("%x", event.Meta.Mark),
centerAlignString(o.getIfaceName(event.Meta.Netns, event.Meta.Ifindex), 16),
byteorder.NetworkToHost16(event.Meta.Proto),
fmt.Sprintf("%d", event.Meta.MTU),
Expand Down

0 comments on commit 05fe67e

Please sign in to comment.