• Phil Sutter's avatar
    ip/tunnel: introduce tnl_parse_key() · a7ed1520
    Phil Sutter authored
    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: default avatarPhil Sutter <phil@nwl.cc>
    a7ed1520
ip6tunnel.c 14 KB