lldpad: Avoid accessing removed port structure

scan_port could access a port structure after it was freed.
This was introduced by commit c0fe8bcd0207.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
lldp: Simplify set_lldp_agent_admin() to fix RHEL 6.4 compiler error

set_lldp_agent_admin() can be used to set all ports admin state but
all callers of the routine check the ifname passed to the routine
before calling the routine and return an error if it is not correctly
set.

To simplify the logic in this routine and remove a lot of if/else
cases we can assume the ifname is provided and remove the set all
case.

This resolves a compile failure on RHEL6.4 created by this warning:

error:
gcc .... -c -o ports.o `test -f 'lldp/ports.c' || echo './'`lldp/ports.c
cc1: warnings being treated as errors
lldp/ports.c: In function ‘set_lldp_agent_admin’:
lldp/ports.c:130: error: ‘ifindex’ may be used uninitialized in this function
make: *** [ports.o] Error 1
[root@f10n3 lldpad]#

Reported-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Suggested-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>