]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip/tunnel: introduce tnl_parse_key()
authorPhil Sutter <phil@nwl.cc>
Fri, 13 Nov 2015 17:08:55 +0000 (18:08 +0100)
committerStephen Hemminger <shemming@brocade.com>
Mon, 23 Nov 2015 23:26:37 +0000 (15:26 -0800)
commita7ed1520ee9645e31b94caf72cad47be31856745
tree6c40f94f2a85cc98a163de6845d38b96728abd5f
parent8de592d05c81e373028191141bdba05ee17c50c7
ip/tunnel: introduce tnl_parse_key()

Instead of duplicating the same code six times (key, ikey and okey in
iptunnel and ip6tunnel), have a common parsing routine. This has the
added benefit of having the same verbose error message in ip6tunnel as
well as iptunnel.

I'm not sure if parsing an IPv4 address as key makes sense for
ip6tunnel, but the code was there before so this patch at least doesn't
make it worse.

Signed-off-by: Phil Sutter <phil@nwl.cc>
ip/ip6tunnel.c
ip/iptunnel.c
ip/tunnel.c
ip/tunnel.h