]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
13 years agoPrepare for release (0.5.2). 0.5.2
Vincent Bernat [Sat, 9 Oct 2010 14:57:45 +0000 (16:57 +0200)] 
Prepare for release (0.5.2).

13 years agoAdd AM_MAINTAINER_MODE macro to configure.ac.
Vincent Bernat [Sun, 19 Sep 2010 13:18:03 +0000 (15:18 +0200)] 
Add AM_MAINTAINER_MODE macro to configure.ac.

13 years agoAdd autogen.sh from buildconf.
Vincent Bernat [Thu, 16 Sep 2010 14:46:40 +0000 (16:46 +0200)] 
Add autogen.sh from buildconf.

See http://buildconf.brlcad.org/

13 years agoAdd receive-only mode switch "-r" to usage()
Vincent Bernat [Thu, 26 Aug 2010 14:34:01 +0000 (16:34 +0200)] 
Add receive-only mode switch "-r" to usage()

13 years agoAdd a receive-only mode with "-r" switch.
Vincent Bernat [Thu, 26 Aug 2010 13:35:32 +0000 (15:35 +0200)] 
Add a receive-only mode with "-r" switch.

13 years agoHide unwanted remote ports just after receiving information about them.
Vincent Bernat [Tue, 24 Aug 2010 20:22:04 +0000 (22:22 +0200)] 
Hide unwanted remote ports just after receiving information about them.

13 years agoMore flexible smart mode and new default.
Vincent Bernat [Tue, 24 Aug 2010 17:39:06 +0000 (19:39 +0200)] 
More flexible smart mode and new default.

Allow any combination of filtering, one neighbor and one protocol,
both for incoming frames and outgoing frames.

13 years agoFix AX_CFLAGS_GCC_OPTION to make it work with autoconf 2.67.
Vincent Bernat [Tue, 24 Aug 2010 17:38:21 +0000 (19:38 +0200)] 
Fix AX_CFLAGS_GCC_OPTION to make it work with autoconf 2.67.

13 years agoPatch to keep wifi and bridge cap when updating chassis.
Vincent Bernat [Wed, 21 Jul 2010 06:38:38 +0000 (08:38 +0200)] 
Patch to keep wifi and bridge cap when updating chassis.

Thanks to Alex Unigovsky. This fixes #45.

13 years agoHarden lldpd with the use of RELRO and NOW linker options.
Vincent Bernat [Wed, 7 Jul 2010 13:34:17 +0000 (15:34 +0200)] 
Harden lldpd with the use of RELRO and NOW linker options.

See:
 http://www.gentoo.org/proj/en/hardened/hardened-toolchain.xml

13 years agoReenable SNMP support on Fedora 13.
Vincent Bernat [Tue, 22 Jun 2010 11:49:04 +0000 (13:49 +0200)] 
Reenable SNMP support on Fedora 13.

The Net-SNMP installation has been fixed in bug #603243:
 https://bugzilla.redhat.com/show_bug.cgi?id=603243

13 years ago[lldpctl] Fix a spelling error
Vincent Bernat [Fri, 18 Jun 2010 18:01:01 +0000 (20:01 +0200)] 
[lldpctl] Fix a spelling error

13 years agoSync Debian packaging with official packaging.
Vincent Bernat [Sat, 12 Jun 2010 09:34:25 +0000 (11:34 +0200)] 
Sync Debian packaging with official packaging.

The sync is not complete (we want to stay compatible with older
releases of Debian).

13 years agoProvide an initscript targetted at SuSE.
Vincent Bernat [Sat, 12 Jun 2010 07:29:20 +0000 (09:29 +0200)] 
Provide an initscript targetted at SuSE.

SysV init scripts are too different between SuSE and
Fedora/RHEL/CentOS to be the same.

Use built-in %_initrddir macro in lldpd.sec.

13 years agoAvoid linking lldpd to libxml2 and lldpctl to libnetsnmp.
Vincent Bernat [Sat, 12 Jun 2010 07:02:25 +0000 (09:02 +0200)] 
Avoid linking lldpd to libxml2 and lldpctl to libnetsnmp.

AC_CHECK_LIB default action is to add the check library to LIBS. We
don't want this.

13 years agonet-snmp/agent/utils_func.h header is useless in agent_priv.c
Vincent Bernat [Sat, 12 Jun 2010 01:14:26 +0000 (03:14 +0200)] 
net-snmp/agent/utils_func.h header is useless in agent_priv.c

13 years agoFix compilation with RHEL 5.
Vincent Bernat [Sat, 12 Jun 2010 00:50:04 +0000 (02:50 +0200)] 
Fix compilation with RHEL 5.

On RHEL 5, we need to link to libsensors...

13 years agoFix .spec for SuSE.
Vincent Bernat [Fri, 11 Jun 2010 22:56:06 +0000 (00:56 +0200)] 
Fix .spec for SuSE.

Packages can now be built on OpenSuSE and SLES. It has not been really
tested. Notably, maybe the init script is totally inappropriate...

13 years agoFix compilation on RHEL and Fedora 13.
Vincent Bernat [Fri, 11 Jun 2010 16:40:18 +0000 (18:40 +0200)] 
Fix compilation on RHEL and Fedora 13.

On those systems, we seem to have problems with Net-SNMP. We take an
easy path by disabling Net-SNMP support by default.

13 years agoBe compatible with RHEL4.
Vincent Bernat [Fri, 11 Jun 2010 15:49:59 +0000 (17:49 +0200)] 
Be compatible with RHEL4.

RHEL4 does not define bcond_without and with macros. Define them.

13 years agoPrepare for release. 0.5.1
Vincent Bernat [Thu, 10 Jun 2010 15:09:03 +0000 (17:09 +0200)] 
Prepare for release.

13 years agoAdd smart mode support.
Vincent Bernat [Wed, 9 Jun 2010 16:13:43 +0000 (18:13 +0200)] 
Add smart mode support.

This features was removed in previous versions to allow to have
several neighbors on one port. It now uses a different approach. Each
port can still have several neighbors but some of them will be hidden.

13 years agoRevert "configure: try to use -Wl,--as-needed if possible"
Vincent Bernat [Thu, 10 Jun 2010 07:37:51 +0000 (09:37 +0200)] 
Revert "configure: try to use -Wl,--as-needed if possible"

This reverts commit 01b911bccfa29435929665c7df827f70de36ccfa. On some
systems, netsnmpagent is not linked to all required libs.

undefined symbol: netsnmpUDPDomain(/usr/lib/libnetsnmpagent.so.9)
undefined symbol: vacm_parse_config_group(/usr/lib/libnetsnmpagent.so.9)
undefined symbol: netsnmp_TCPIPv6Domain(/usr/lib/libnetsnmpagent.so.9)
undefined symbol: snmp_errno(/usr/lib/libnetsnmpagent.so.9)
[...]

Therefore, we really need to really need to link to some libraries
present in net-snmp-config.

13 years agoAdd prototype for lldpd_get_lsb_release().
Vincent Bernat [Wed, 9 Jun 2010 14:17:20 +0000 (16:17 +0200)] 
Add prototype for lldpd_get_lsb_release().

13 years agoGroup together related configuration information.
Vincent Bernat [Wed, 9 Jun 2010 12:59:22 +0000 (14:59 +0200)] 
Group together related configuration information.

In "struct lldpd", system description configuration was scattered into
the structure.

13 years agoIf available, use the output of lsb_release for system description.
Vincent Bernat [Wed, 9 Jun 2010 11:18:17 +0000 (13:18 +0200)] 
If available, use the output of lsb_release for system description.

13 years agoDon't check CDP checksums.
Vincent Bernat [Tue, 8 Jun 2010 16:45:52 +0000 (18:45 +0200)] 
Don't check CDP checksums.

Some VLAN encapsulated CDP frames seem to have a checksum difficult to
verify. We give up on checking correctly CDP checksums. It is turned
into a dead code for future reference.

13 years agoListen on VLAN using an appropriate BPF filter and VLAN decapsulation.
Vincent Bernat [Tue, 8 Jun 2010 16:39:18 +0000 (18:39 +0200)] 
Listen on VLAN using an appropriate BPF filter and VLAN decapsulation.

Three cases may happen:
 - You have a non VLAN accelerated network card.
   The BPF filter will catch the frames in the VLAN and the frame will
   be decapsulated.
 - You have a VLAN accelerated network card and a kernel < 2.6.27.
   lldpd won't see any frame encapsulated into a VLAN.
 - You have a VLAN accelerated network card and a kernel >= 2.6.27.
   lldpd will see the frames encapsulated into a VLAN as untagged
   frames and won't need to decapsulate them.

13 years agoRemove "listen on VLAN" feature.
Vincent Bernat [Tue, 8 Jun 2010 15:49:33 +0000 (17:49 +0200)] 
Remove "listen on VLAN" feature.

This feature was intrusive and not very well tested. We will replace
it with less code using the fact that a recent kernel is able to
listen on all VLAN is asked to.

13 years agoconfigure: try to use -Wl,--as-needed if possible
Vincent Bernat [Thu, 20 May 2010 22:24:44 +0000 (00:24 +0200)] 
configure: try to use -Wl,--as-needed if possible

This may be useful if net-snmp-config pulls a lot of dependencies
which are not really needed (like libperl, libpthread, libcrypto).

13 years agolldpd.spec: requires openssl since it is required by net-snmp
Vincent Bernat [Thu, 20 May 2010 21:49:06 +0000 (23:49 +0200)] 
lldpd.spec: requires openssl since it is required by net-snmp

Thanks to Lamont Granquist for the fix.

13 years agoMake AM_SILENT_RULES optional.
Vincent Bernat [Thu, 20 May 2010 06:37:53 +0000 (08:37 +0200)] 
Make AM_SILENT_RULES optional.

13 years agoFix additional alignment issues for ARM platform.
Vincent Bernat [Wed, 12 May 2010 18:06:02 +0000 (20:06 +0200)] 
Fix additional alignment issues for ARM platform.

This solves the following GCC warnings:

interfaces.c: In function ‘iface_minimal_checks’:
interfaces.c:421: warning: cast increases required alignment of target type [-Wcast-align]
interfaces.c: In function ‘lldpd_ifh_eth’:
interfaces.c:732: warning: cast increases required alignment of target type [-Wcast-align]
interfaces.c: In function ‘lldpd_ifh_mgmt’:
interfaces.c:1127: warning: cast increases required alignment of target type [-Wcast-align]

13 years agoFix an unaligned access when chassis ID is an IP address.
Vincent Bernat [Wed, 12 May 2010 09:57:11 +0000 (11:57 +0200)] 
Fix an unaligned access when chassis ID is an IP address.

13 years agoFix AC_CHECK_DECLS macro in configure.ac
Vincent Bernat [Wed, 12 May 2010 09:42:20 +0000 (11:42 +0200)] 
Fix AC_CHECK_DECLS macro in configure.ac

This macro does not behave like AC_CHECK_FUNCS whose content is copied
in a shell for loop. Therefore, extra spaces may be turned into
underscores. We keep multiple lines but we remove backslashes and
extra spaces.

14 years agoDon't try to guess FD_SETSIZE correct value when cross-compiling.
Vincent Bernat [Tue, 11 May 2010 14:15:23 +0000 (16:15 +0200)] 
Don't try to guess FD_SETSIZE correct value when cross-compiling.

14 years agoRevert "Blacklist VMWare interfaces (as per ticket #40)."
Vincent Bernat [Mon, 3 May 2010 13:27:15 +0000 (15:27 +0200)] 
Revert "Blacklist VMWare interfaces (as per ticket #40)."

It seems that vnetX interfaces are also used by other virtualization
solutions. From now on, we rely only on the queue len of the interface
and not on the name.

This reverts commit 91eb6d5df80933d089bda9543b2dbf3d97d462e1.

14 years agoBlacklist VMWare interfaces (as per ticket #40).
Vincent Bernat [Sun, 25 Apr 2010 10:26:17 +0000 (12:26 +0200)] 
Blacklist VMWare interfaces (as per ticket #40).

14 years agoIgnore interfaces with no queue.
Vincent Bernat [Sun, 11 Apr 2010 12:53:32 +0000 (14:53 +0200)] 
Ignore interfaces with no queue.

This filters out vnet* interfaces and some others. It seems that
physical (real or virtual) interfaces always have a queue. We might
also check qdisc. If "noop", this means that the interface is a
blackhole and should be ignored. However, we wait for an actual
interface to exhibit a behaviour where such a detection is needed.

14 years agoTypo in usage string of lldpd
Vincent Bernat [Sun, 25 Apr 2010 09:46:59 +0000 (11:46 +0200)] 
Typo in usage string of lldpd

14 years agoAdd an entry to the manual page for -S option.
Vincent Bernat [Fri, 23 Apr 2010 22:01:01 +0000 (00:01 +0200)] 
Add an entry to the manual page for -S option.

14 years agoAdd -S <system_description> override.
Stig Thormodsrud [Fri, 23 Apr 2010 01:32:53 +0000 (18:32 -0700)] 
Add -S <system_description> override.

vyatta@vDUT:~$ show lldp neighbors detail
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    eth0, via: LLDP, RID: 14, Time: 0 day, 00:02:03
  Chassis:
    ChassisID:    mac 00:0c:29:8c:53:7c
    SysName:      R1
    SysDescr:     Vyatta 3500 series running on VSE6.0
    Capability:   Bridge, off
    Capability:   Router, on
    Capability:   Wlan, off
  Port:
    PortID:       ifname eth1
    PortDescr:    vmnet1
    PMD autoneg:  supported: yes, enabled: yes
      Adv:          10Base-T, HD: yes, FD: yes
      Adv:          100Base-T, HD: yes, FD: yes
      Adv:          1000Base-T, HD: no, FD: yes
      MAU oper type: 1000BaseTFD - Four-pair Category 5 UTP, full duplex
mode
  VLAN:         101 eth1.101

14 years agoAdd a new output for lldpctl: keyvalue.
Vincent Bernat [Sun, 11 Apr 2010 08:14:12 +0000 (10:14 +0200)] 
Add a new output for lldpctl: keyvalue.

This output allows is easily parseable through a shell script (sed,
grep, awk). There is still room for improvement on how to handle
attributes.

14 years agoAdd SNMP support of lldpXMedPoE stuff.
Vincent Bernat [Sun, 4 Apr 2010 07:53:58 +0000 (09:53 +0200)] 
Add SNMP support of lldpXMedPoE stuff.

Since LLDP-MED MIB does not allow to store per-port information for PD
devices and does not allow a device to be both PSE and PD (even on
different ports), we try to work around this.

802.3af/at does not have this limitation. All those information are
per-port.

14 years agoList MDI/PSE and MDI/PD as an available LLDP-MED capability for the chassis.
Vincent Bernat [Sat, 27 Mar 2010 00:06:33 +0000 (01:06 +0100)] 
List MDI/PSE and MDI/PD as an available LLDP-MED capability for the chassis.

Add Network Policy as well which was left behind.

14 years agoUpdate unittests for LLDP-MED POE-MDI TLV.
Vincent Bernat [Sat, 27 Mar 2010 00:00:23 +0000 (01:00 +0100)] 
Update unittests for LLDP-MED POE-MDI TLV.

14 years agoAdd a CHANGELOG entry about setting LLDP-MED POE-MDI from lldpctl.
Vincent Bernat [Fri, 26 Mar 2010 23:56:15 +0000 (00:56 +0100)] 
Add a CHANGELOG entry about setting LLDP-MED POE-MDI from lldpctl.

14 years agoAllow to set LLDP-MED POE-MDI TLV from lldpctl.
Vincent Bernat [Fri, 26 Mar 2010 23:55:02 +0000 (00:55 +0100)] 
Allow to set LLDP-MED POE-MDI TLV from lldpctl.

This adds a "-O" option to lldpctl.

14 years agoMove LLDP-MED POE stuff into a dedicated structure.
Vincent Bernat [Fri, 26 Mar 2010 22:24:35 +0000 (23:24 +0100)] 
Move LLDP-MED POE stuff into a dedicated structure.

This will allow to send this structure without sending the whole port
information.

14 years agoAdd SNMP support for lldpXMedRemLocationTable.
Vincent Bernat [Sat, 3 Apr 2010 21:08:04 +0000 (23:08 +0200)] 
Add SNMP support for lldpXMedRemLocationTable.

This table was not implemented when lldpctl support for setting
location was added.

14 years agoMerge branch '38-lldpmed-network-policy'
Vincent Bernat [Sat, 3 Apr 2010 20:54:58 +0000 (22:54 +0200)] 
Merge branch '38-lldpmed-network-policy'

14 years agoAdd SNMP support for lldpXMedLocMediaPolicyTable.
Vincent Bernat [Sat, 3 Apr 2010 20:54:12 +0000 (22:54 +0200)] 
Add SNMP support for lldpXMedLocMediaPolicyTable.

14 years agoEnsure that documentation is installed in the right place.
Vincent Bernat [Sun, 28 Mar 2010 20:53:08 +0000 (22:53 +0200)] 
Ensure that documentation is installed in the right place.

On SuSE derivatives, the documentation is not in /usr/share/doc/lldpd
but in /usr/share/doc/packages/lldpd.

14 years agoFix installation of CHANGELOG file in lldpd.spec.
Vincent Bernat [Sun, 28 Mar 2010 20:43:04 +0000 (22:43 +0200)] 
Fix installation of CHANGELOG file in lldpd.spec.

14 years agoAdapt unittests to consider LLDP-MED network policy TLV.
Vincent Bernat [Fri, 26 Mar 2010 22:32:20 +0000 (23:32 +0100)] 
Adapt unittests to consider LLDP-MED network policy TLV.

LLDP-MED network policy TLV is not ignored any more and is included
(if present) in LLDP packets.

14 years agoAdd proper credit in CHANGELOG for network policy.
Vincent Bernat [Wed, 24 Mar 2010 22:13:32 +0000 (23:13 +0100)] 
Add proper credit in CHANGELOG for network policy.

14 years agoAdd a CHANGELOG entry about setting network policy from lldpctl.
Vincent Bernat [Wed, 24 Mar 2010 22:11:16 +0000 (23:11 +0100)] 
Add a CHANGELOG entry about setting network policy from lldpctl.

14 years agoAllow lldpctl to set both location and policy at the same time.
Vincent Bernat [Wed, 24 Mar 2010 22:02:58 +0000 (23:02 +0100)] 
Allow lldpctl to set both location and policy at the same time.

14 years agoAllow to set LLDP-MED network policy TLV from lldpctl.
Vincent Bernat [Wed, 24 Mar 2010 21:57:30 +0000 (22:57 +0100)] 
Allow to set LLDP-MED network policy TLV from lldpctl.

Patch from Philipp Kempgen. This adds a "-P" option to lldpctl that
can be repeated several times.

14 years agoInitialize changelog for 0.5.1.
Vincent Bernat [Wed, 24 Mar 2010 22:09:24 +0000 (23:09 +0100)] 
Initialize changelog for 0.5.1.

14 years agoFix hang issue in select() loop with SNMP.
Vincent Bernat [Tue, 23 Mar 2010 14:32:29 +0000 (15:32 +0100)] 
Fix hang issue in select() loop with SNMP.

The last argument of snmp_select_info() should be set to 0 and should
be checked to be 0 after call. Otherwise, the timeval argument should
be ignored.

14 years agoAllow to force a protocol.
Vincent Bernat [Fri, 12 Mar 2010 13:47:05 +0000 (14:47 +0100)] 
Allow to force a protocol.

This fixes ticket #34. By using the option to enable a protocol twice,
we are able to speak a protocol even when no peer is detected. In this
case, packets are sent even when another protocol is detected. A new
parameter has been added to get this behaviour for LLDP as well.

14 years agoAdd specifically a "-h" switch for lldpd and lldpctl
Vincent Bernat [Wed, 17 Mar 2010 12:48:48 +0000 (13:48 +0100)] 
Add specifically a "-h" switch for lldpd and lldpctl

14 years agoAdd "format" option.
Vincent Bernat [Wed, 17 Mar 2010 12:44:44 +0000 (13:44 +0100)] 
Add "format" option.

14 years agoUse some conditionals to display some command line options.
Vincent Bernat [Wed, 17 Mar 2010 12:43:58 +0000 (13:43 +0100)] 
Use some conditionals to display some command line options.

14 years agoAdd a summary of available options in usage() of lldpd and lldpctl
Vincent Bernat [Wed, 17 Mar 2010 12:38:11 +0000 (13:38 +0100)] 
Add a summary of available options in usage() of lldpd and lldpctl

Patch from Jorge Boncompte (see ticket #29).

14 years agoUpdate README with the latest information 0.5.0
Vincent Bernat [Sat, 13 Mar 2010 21:18:03 +0000 (22:18 +0100)] 
Update README with the latest information

14 years agoAfter displaying PVID, close the section tag.
Vincent Bernat [Sat, 13 Mar 2010 21:14:31 +0000 (22:14 +0100)] 
After displaying PVID, close the section tag.

14 years agoAdd XML support for Redhat as well.
Vincent Bernat [Fri, 12 Mar 2010 19:13:17 +0000 (20:13 +0100)] 
Add XML support for Redhat as well.

14 years agoCompile with XML enabled for Debian.
Vincent Bernat [Fri, 12 Mar 2010 19:09:51 +0000 (20:09 +0100)] 
Compile with XML enabled for Debian.

14 years agoRemove unused chassis in lldpd_cleanup() instead of lldpd_port_cleanup().
Vincent Bernat [Fri, 12 Mar 2010 16:12:52 +0000 (17:12 +0100)] 
Remove unused chassis in lldpd_cleanup() instead of lldpd_port_cleanup().

In some cases, lldpd_port_cleanup() is called when a reference to the
chassis that will be removed is hold for updating. This happens when
we need to update the information on a chassis known by only one port:
 1. we find that the chassis is still the same
 2. we remove the port and hence remove the chassis which becomes
    unused and freed
 3. with the previous reference to the chassis, we try to update it
    with new information while it has been freed.

Freeing in lldpd_cleanup() is more natural and less risky.

14 years agoRetrieve FD_SETSIZE in a sane environment.
Vincent Bernat [Fri, 12 Mar 2010 11:03:24 +0000 (12:03 +0100)] 
Retrieve FD_SETSIZE in a sane environment.

Since we import linux/if.h, in some environment, we may end up
importing kernel FD_SETSIZE that may be inappropriate (too large). For
example, on Sarge systems, FD_SETSIZE becomes 8192 instead of 1024 but
FD_ISSET is unable to handle this size.

14 years agoIncrease refcount of the local chassis when a new port is created.
Vincent Bernat [Wed, 10 Mar 2010 07:22:40 +0000 (08:22 +0100)] 
Increase refcount of the local chassis when a new port is created.

Also add an explanation of refcount handling in a part of the code
that was a bit difficult to follow. Now, each time that p_chassis is
affected to a new value, c_refcount should be updated accordingly.

14 years agoAdd a CHANGELOG entry for XML output functionality.
Vincent [Sat, 6 Mar 2010 09:15:14 +0000 (10:15 +0100)] 
Add a CHANGELOG entry for XML output functionality.

14 years agoFix wrong age display.
Andreas Hofmeister [Mon, 1 Mar 2010 14:28:29 +0000 (15:28 +0100)] 
Fix wrong age display.

There are only 24 hours and 60 minutes per hour ...

14 years agoUse LLOG_WARNX in xml_writer.c and remove superfluous newlines.
Andreas Hofmeister [Sun, 28 Feb 2010 16:50:35 +0000 (17:50 +0100)] 
Use LLOG_WARNX in xml_writer.c and remove superfluous newlines.

14 years agoAdd the text output label as "label" attribute to all xml elements.
Andreas Hofmeister [Sun, 28 Feb 2010 16:45:12 +0000 (17:45 +0100)] 
Add the text output label as "label" attribute to all xml elements.

Might be helpful when creating html via xslt etc.

14 years agoFix error handling in location data.
Andreas Hofmeister [Sun, 28 Feb 2010 16:26:14 +0000 (17:26 +0100)] 
Fix error handling in location data.

Instead of just logging an invalid data length for location data, an error
element is emited to the output.

An unknown location fromat is now enclosed in an "unknown" tag to prevent
that the "location" element ever contains character data.

14 years agoImplement an XML writer.
Andreas Hofmeister [Sun, 28 Feb 2010 14:32:01 +0000 (15:32 +0100)] 
Implement an XML writer.

XML output can be enabled with the "--with-xml" configure option. libxml2 is
used to create the actual XML output.

14 years agoImplement a basic "writer" infrastructure to emit structured text.
Andreas Hofmeister [Sun, 28 Feb 2010 14:24:35 +0000 (15:24 +0100)] 
Implement a basic "writer" infrastructure to emit structured text.

This patch implements a basic plain text writer and uses that in display.c.

14 years agoRip display related stuff out of lldpctl and put into display.c
Andreas Hofmeister [Fri, 26 Feb 2010 18:13:36 +0000 (19:13 +0100)] 
Rip display related stuff out of lldpctl and put into display.c

14 years agoAvoid dereferencing a type-punned pointer.
Vincent [Sat, 6 Mar 2010 08:53:40 +0000 (09:53 +0100)] 
Avoid dereferencing a type-punned pointer.

When passing a file descriptor, we were dereferencing a unsigned char
pointer. This breaks strict-aliasing rules in C99. Moreover, we should
care about the alignment (even if in this case, this is aligned
because the previous member of the struct is an int). Therefore, we
use memcpy instead.

14 years agoFree unused chassis.
Vincent [Sat, 6 Mar 2010 08:41:53 +0000 (09:41 +0100)] 
Free unused chassis.

When reference count for a chassis drops to 0, we free the chassis.
This cannot happen to the local chassis because a reference should be
held to it even without any local port.

14 years agoDon't listen/send LLDP packets on bridge.
Vincent [Tue, 2 Mar 2010 17:17:04 +0000 (18:17 +0100)] 
Don't listen/send LLDP packets on bridge.

A bridge, like a VLAN or a bond device is no place to listen or send
LLDP packets.

14 years agoDo not require libtool 2.2
Andreas Hofmeister [Fri, 26 Feb 2010 17:47:05 +0000 (18:47 +0100)] 
Do not require libtool 2.2

... 1.5.26 apparently does nicely.

14 years agoMake lldpctl refuse attempts to change anything when running setuid.
Andreas Hofmeister [Sat, 27 Feb 2010 18:58:46 +0000 (19:58 +0100)] 
Make lldpctl refuse attempts to change anything when running setuid.

When running setuid, lldpctl now refuses to set location data. This should
make it save to run the program setuid root by normal users including a
web-server f.e.

14 years agoFix autoconf complains about libtool.
Andreas Hofmeister [Fri, 26 Feb 2010 16:59:21 +0000 (17:59 +0100)] 
Fix autoconf complains about libtool.

Add AC_PROG_LIBTOOL and removed AC_PROG_RANLIB.

14 years agoAdd a manual page for the new -X option.
Vincent [Sat, 27 Feb 2010 09:25:56 +0000 (10:25 +0100)] 
Add a manual page for the new -X option.

14 years agoAllow to specify the AgentX socket to use (instead of the default one).
Vincent [Sat, 27 Feb 2010 09:18:03 +0000 (10:18 +0100)] 
Allow to specify the AgentX socket to use (instead of the default one).

This means that AgentX can be configured to use tcp:127.0.0.1:705 (for
example). Since we are running in a chroot, we cannot use hostnames.
Any network socket should work. Unix sockets should work as before
(using privilege separation).

14 years agoEnsure that umask is set at a sensible value before building the chroot.
Vincent [Sat, 27 Feb 2010 08:57:48 +0000 (09:57 +0100)] 
Ensure that umask is set at a sensible value before building the chroot.

Since the unprivileged process needs to be able to read /etc/localtime
in the chroot, we ensure that the umask is set correctly for this.

14 years agoFor Redhat, adapt init.d script to initialize the chroot.
Vincent [Sat, 27 Feb 2010 08:53:38 +0000 (09:53 +0100)] 
For Redhat, adapt init.d script to initialize the chroot.

The chroot is an empty directory containing a copy of /etc/localtime
to enable the use of the correct timestamp when logging for the
process trapped in the chroot.

14 years agoFor Debian init.d, build the chroot before starting the daemon.
Vincent Bernat [Sat, 27 Feb 2010 08:48:10 +0000 (09:48 +0100)] 
For Debian init.d, build the chroot before starting the daemon.

The chroot is an empty directory with a copy of /etc/localtime. This
file ensures that we are able to write logs using the correct time.

14 years agoChange handling of conditional builds in the spec file
Peter Kjellström [Fri, 12 Feb 2010 11:31:13 +0000 (12:31 +0100)] 
Change handling of conditional builds in the spec file

Change handling of build options from using simple define statements
to using the RPMs bcond_without functionality. bcond_without instead
of bcond_with ensures that the old behaviour is preserved (all
options are still enabled by default). This change allows the
convenient "rpmbuild --without xxx" and is in line with:

http://www.rpm.org/wiki/PackagerDocs/ConditionalBuilds

14 years agoMerge branch '30-vlanid-without-name'
Vincent Bernat [Sat, 5 Dec 2009 11:09:27 +0000 (12:09 +0100)] 
Merge branch '30-vlanid-without-name'

14 years agoDon't set MFS with MTU value.
Vincent Bernat [Sat, 5 Dec 2009 10:58:51 +0000 (11:58 +0100)] 
Don't set MFS with MTU value.

Because there is no way to retrieve MFS value from Linux (unless we
try to set it to some arbitrary value), we did use the MTU instead.
This is incorrect, as notified in ticket #31.

Since some equipements could use this value to trigger an alert, we
prefer not to send any value. We don't seem able to detect for VLAN
support or Jumbo frames support.

14 years agoDisplay PVID even when we don't know its name.
Vincent Bernat [Sat, 5 Dec 2009 10:49:30 +0000 (11:49 +0100)] 
Display PVID even when we don't know its name.

We also display it if we have names for some VLANs but not for the
PVID one.

14 years agoCope with Port VLAN ID but no VLAN names.
Vincent Bernat [Sat, 5 Dec 2009 10:44:11 +0000 (11:44 +0100)] 
Cope with Port VLAN ID but no VLAN names.

This fix ticket #30.

14 years agoMake netsnmp headers compatible with C99.
Vincent Bernat [Wed, 28 Oct 2009 10:38:03 +0000 (11:38 +0100)] 
Make netsnmp headers compatible with C99.

Disable inlining by adding -DNETSNMP_NO_INLINE to CFLAGS. Since we
only use header files, this should not be a problem. A more valid fix
would be to turn NETSNMP_INLINE into "extern inline" instead of just
"inline".

Without this fix, we get a lot of warnings with gcc 4.3.

14 years agoMake lldpctl display the age of displayed information.
Vincent Bernat [Mon, 19 Oct 2009 17:07:52 +0000 (19:07 +0200)] 
Make lldpctl display the age of displayed information.

We rely on recorded time for last change and display the difference
with the current time. Information is displayed like this:

Interface: veth1 (via LLDP) - RID: 1 - Time: 0 day, 00:04:42

Any change will reset this time (for example, a new VLAN).

This should close ticket #21.

14 years agoAdd some additional GCC options by default.
Vincent Bernat [Wed, 28 Oct 2009 09:55:53 +0000 (10:55 +0100)] 
Add some additional GCC options by default.

We enable most warnings (but disable unused-parameter and
sign-compare). We also enable stack protector.