]> git.ipfire.org Git - thirdparty/iptables.git/commit
xshared: Share a common add_command() implementation
authorPhil Sutter <phil@nwl.cc>
Tue, 22 Oct 2019 20:49:29 +0000 (22:49 +0200)
committerPhil Sutter <phil@nwl.cc>
Wed, 30 Oct 2019 09:00:57 +0000 (10:00 +0100)
commit45989e8fbec52fcbafa5ae9917fc2a0d62e3640d
treea39778ab0d5875aec2f2e2c6a4d3f465006f248f
parent8e502b02ef911cb8c05ea58acd7e2a4c397d1831
xshared: Share a common add_command() implementation

The shared definition of cmdflags is a super set of the previous one in
xtables-arp.c so while not being identical, they're compatible.

Avoid accidental array overstep in cmd2char() by incrementing an index
variable and checking its final value before using it as such.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/ip6tables.c
iptables/iptables.c
iptables/xshared.c
iptables/xshared.h
iptables/xtables-arp.c
iptables/xtables.c