]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: user proper argument index
authorIoana Ciornei <ioana.ciornei@nxp.com>
Wed, 9 Jan 2019 17:06:55 +0000 (17:06 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 10 Jan 2019 14:54:47 +0000 (15:54 +0100)
commit34641d97082f7cccdd10157c3cf1a012378bca49
treea10da71432c66ad95d7a8f05bffe41ad5d6a0361
parente60eaf3ea94c36211190e203a78f639209bb345b
samples: bpf: user proper argument index

Use optind as index for argv instead of a hardcoded value.
When the program has options this leads to improper parameter handling.

Fixes: 787841a64a81 ("samples: bpf: get ifindex from ifname")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/bpf/xdp1_user.c