Skip to content

Commit

Permalink
cmd/scion: set payload size appropriately if --max-mtu is set (scionp…
Browse files Browse the repository at this point in the history
…roto#4250)

Correct the behavior of the `--max-mtu` flag for `scion ping`.

Previously, there was a bug where the calculated payload size was ignored and the value from `--payload-size` was taken.
In most cases, this would be the default.
  • Loading branch information
bunert authored and benthor committed Nov 24, 2022
1 parent 6931f48 commit 64c4d18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scion/cmd/scion/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ On other errors, ping will exit with code 2.
Timeout: flags.timeout,
Local: local,
Remote: remote,
PayloadSize: int(flags.size),
PayloadSize: pldSize,
ErrHandler: func(err error) {
fmt.Fprintf(os.Stderr, "ERROR: %s\n", err)
},
Expand Down

0 comments on commit 64c4d18

Please sign in to comment.