Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 165001 - net-analyzer/net-snmp-5.4.2.1-r4: patch to remove duplicate iftable entries
Summary: net-analyzer/net-snmp-5.4.2.1-r4: patch to remove duplicate iftable entries
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-02 16:35 UTC by cilly
Modified: 2012-08-19 02:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net-snmp-5.4.2.1-remove_duplicate_iftable (net-snmp-5.4.2.1-remove_duplicate_iftable.patch,4.00 KB, patch)
2010-08-13 07:27 UTC, cilly
Details | Diff
net-snmp-5.4.2.1.ebuild.diff (net-snmp-5.4.2.1-r4.ebuild.diff,407 bytes, patch)
2010-08-13 07:30 UTC, cilly
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description cilly 2007-02-02 16:35:34 UTC
If you are on a dynamic IP and your provider assigns you a new IP, then the snmp is broken, it lists an additional ppp0 device after each ip-change even if ifconfig lists only one:

snmpwalk -v 1 -c public localhost interface|grep ppp0

IF-MIB::ifDescr.61 = STRING: ppp0
IF-MIB::ifDescr.62 = STRING: ppp0
IF-MIB::ifDescr.63 = STRING: ppp0
Comment 1 cilly 2007-02-02 17:29:35 UTC
HINT to test:

kill -HUP `cat /var/run/ppp0.pid`

snmpwalk -v 1 -c public localhost interface|grep ppp0
Comment 2 cilly 2007-02-02 19:25:43 UTC
Warning:

the old snmp does not compile if you upgraded autoconf, to downgrade to

net-analyzer/net-snmp-5.2.1.2-r1

I had also to downgrade autoconf to following versions:

sys-devel/autoconf-wrapper-3.2-r2
sys-devel/autoconf-2.60
sys-devel/automake-wrapper-2-r1


See:

i586-pc-linux-gnu-gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/5.8.8/i586-linux-thread-multi/CORE -DINET6 -march=i586 -Os -m3dnow -mmmx -pipe -fomit-frame-pointer -Dlinux -c ucd-snmp/disk.c  -fPIC -DPIC -o ucd-snmp/.libs/disk.lo
ucd-snmp/disk.c:233:36: error: operator '||' has no right operand
ucd-snmp/disk.c:281:36: error: operator '||' has no right operand
ucd-snmp/disk.c:377:19: error: #if with no expression
ucd-snmp/disk.c:400:36: error: operator '||' has no right operand
ucd-snmp/disk.c:471:19: error: #if with no expression
ucd-snmp/disk.c:497:36: error: operator '||' has no right operand
make[2]: *** [ucd-snmp/disk.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-snmp-5.2.1.2-r1/work/net-snmp-5.2.1.2/agent/mibgroup'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-snmp-5.2.1.2-r1/work/net-snmp-5.2.1.2/agent'
make: *** [subdirs] Error 1
 
!!! ERROR: net-analyzer/net-snmp-5.2.1.2-r1 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  net-snmp-5.2.1.2-r1.ebuild, line 108:   Called die
 
!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
Comment 4 Markus Ullmann (RETIRED) gentoo-dev 2007-03-27 23:03:27 UTC
Please reopen this bug once upstream has it fixed so we can fix our stuff as well. 

marking LATER for now
Comment 5 cilly 2007-03-27 23:16:12 UTC
(In reply to comment #4)
> Please reopen this bug once upstream has it fixed so we can fix our stuff as
> well. 
> 
> marking LATER for now
> 

Hm I looked at their bugtracker and since version 5.4 of snmp there are filed plenty of new bugs, I am not sure, but would it be advisable to hard mask this version?

See snmp bugs:

http://sourceforge.net/tracker/index.php?func=browse&group_id=12694&atid=112694&set=open&offset=0
Comment 6 cilly 2010-08-13 07:27:43 UTC
Created attachment 242717 [details, diff]
net-snmp-5.4.2.1-remove_duplicate_iftable

If a new device will be added, the old device is first checked. If an old device with the same name is found it is removed from the list. This fixes the problem of duplicate and inactive interfaces in the snmpd ifTable.
Comment 7 cilly 2010-08-13 07:30:14 UTC
Created attachment 242719 [details, diff]
net-snmp-5.4.2.1.ebuild.diff
Comment 8 cilly 2010-08-13 07:34:12 UTC
added patch, pls add to portage

Impact: If there are i.e. many clients connecting and disconnecting via IPsec L2TP, snmp would create each time a new ifTable entry for pppX and this could result in huge memory usage. 

Fixed already in debian, ubuntu and lots of other distros.

Upstream fix expected in version 5.5.
Comment 9 cilly 2010-08-19 19:06:09 UTC
ebuild with patch tested now for 5 days with many IPsec connects and disconnects, working perfectly.

Is there a chance to get this into 5.4.2.1 soon?
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-08-19 02:30:41 UTC
If this is not yet in the upstream source code please provide it there.