Fix potential small memory leak

In __reg_val() in case the 'if (per_port && tdport)' condition is
true, we leak the previously allocated char *subpath.
Instead jump to 'errorout' which frees it, just like the other error
paths do in this function.

Signed-off-by: Michele Baldessari <michele@acksyn.org>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamdctl: add command for easy port presention checking

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
initscripts: do not try to re-add port if it is already there

The thing is that first, the port is downed and after that the teamdctl
util is used to add it. When the port is already there, the only effect
is that the port goes down. Fix this by checking if port is already in team.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd_link_watch: allow to send ARP probes if no source_host is specified

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
bond2team: do not guess source_host option

Since now teamd accepts config without "source_host" set, benefit from
that fact and do not make up some IP address here.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd_link_watch: specify "missed_max" option default value

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
man: correct type of "*_host" options

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamdctl: unmess check_teamd_team_devname and fix double free there

json_decref(j_device_name) was incorrectly called because
json_object_get() returns borrowed reference.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
initscripts: make ifup/ifdown scripts usable by ifup/ifdown-eth scripts

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
libteam: ifinfo: watch for dellink messages and call change handlers for that

This allows user to know an interface was removed.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: quit when our team device is removed from outside

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
1.10 release

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
libteam: Use u8 for put/get TEAM_ATTR_OPTION_TYPE

Use the same type in libteam and kernel for TEAM_ATTR_OPTION_TYPE.
The kernel uses a 8 bit integer (u8).

Signed-off-by: Jonas Johansson <jonasj76@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
libteam: add SubmittingPatches doc

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>