Revision 33b9e70f7ceea28eda07aa2e638f758acacd7032 authored by Tobias Klauser on 30 November 2021, 12:08:22 UTC, committed by Nathan Sweet on 02 December 2021, 23:08:48 UTC
[ upstream commit e38e3c44f712b5f0ecf33efd1867c0ae16b241f7 ]

Commit 8bcc4e5dd830 ("bugtool: avoid allocation on conversion of
execCommand result to string") broke the `ip route show` commands
because the change from `[]byte` to `string` causes the `%v` formatting
verb to emit the raw byte slice, not the string. Fix this by using the
`%s` formatting verb to make sure the argument gets interpreted as a
string.

Also fix another instance in `writeCmdToFile` where `fmt.Fprint` is now
invoked with a byte slice.

Grepping for `%v` in bugtool sources and manually inspecting all changes
from commit 8bcc4e5dd830 showed no other instances where a byte slice
could potentially end up being formatted in a wrong way.

Fixes: 8bcc4e5dd830 ("bugtool: avoid allocation on conversion of execCommand result to string")

Signed-off-by: Tobias Klauser <tobias@cilium.io>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
1 parent b51a044
History
File Mode Size
.github
.travis
Documentation
api
bpf
bugtool
cilium
cilium-health
clustermesh-apiserver
contrib
daemon
envoy
examples
hack
hubble-relay
images
install
jenkinsfiles
operator
pkg
plugins
proxylib
test
tests
tools
vendor
.authors.aux -rw-r--r-- 416 bytes
.dockerignore -rw-r--r-- 1.1 KB
.gitattributes -rw-r--r-- 236 bytes
.gitignore -rw-r--r-- 1.3 KB
.gitmodules -rw-r--r-- 0 bytes
.golangci.yaml -rw-r--r-- 3.2 KB
.mailmap -rw-r--r-- 3.5 KB
.travis.yml -rw-r--r-- 1.1 KB
AUTHORS -rw-r--r-- 16.8 KB
CHANGELOG.md -rw-r--r-- 143.8 KB
CODEOWNERS -rw-r--r-- 1.6 KB
CONTRIBUTING.md -rw-r--r-- 227 bytes
Dockerfile -rw-r--r-- 3.0 KB
Dockerfile.builder -rw-r--r-- 1.2 KB
FURTHER_READINGS.rst -rw-r--r-- 4.9 KB
GO_VERSION -rw-r--r-- 8 bytes
Jenkinsfile.nightly l--------- 32 bytes
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS.rst -rw-r--r-- 2.4 KB
Makefile -rw-r--r-- 23.0 KB
Makefile.buildkit -rw-r--r-- 4.1 KB
Makefile.defs -rw-r--r-- 5.6 KB
Makefile.docker -rw-r--r-- 9.6 KB
Makefile.quiet -rw-r--r-- 718 bytes
README.rst -rw-r--r-- 15.7 KB
SECURITY.md -rw-r--r-- 615 bytes
USERS.md -rw-r--r-- 6.1 KB
VERSION -rw-r--r-- 7 bytes
Vagrantfile -rw-r--r-- 12.6 KB
cilium-dev.Dockerfile -rw-r--r-- 1.4 KB
cilium-dev.Dockerfile.dockerignore -rw-r--r-- 931 bytes
cilium-docker-plugin.Dockerfile -rw-r--r-- 645 bytes
cilium-operator-aws.Dockerfile -rw-r--r-- 1.5 KB
cilium-operator-azure.Dockerfile -rw-r--r-- 1.5 KB
cilium-operator-generic.Dockerfile -rw-r--r-- 1.5 KB
cilium-operator.Dockerfile -rw-r--r-- 1.5 KB
clustermesh-apiserver.Dockerfile -rw-r--r-- 1.6 KB
docs.Jenkinsfile l--------- 29 bytes
flannel.Jenkinsfile l--------- 32 bytes
ginkgo-kubernetes-all.Jenkinsfile l--------- 46 bytes
ginkgo.Jenkinsfile l--------- 31 bytes
go.mod -rw-r--r-- 5.3 KB
go.sum -rw-r--r-- 103.0 KB
hubble-relay.Dockerfile -rw-r--r-- 1.4 KB
kubernetes-upstream.Jenkinsfile l--------- 44 bytes
netlify.toml -rw-r--r-- 92 bytes
vagrant_box_defaults.rb -rw-r--r-- 391 bytes

README.rst

back to top