[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-patches
Subject:    [Net-snmp-patches] [ net-snmp-Patches-1712645 ] meaningful log
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2007-10-15 8:28:51
Message-ID: E1IhLJj-0007mf-Ot () sc8-sf-web22 ! sourceforge ! net
[Download RAW message or body]

Patches item #1712645, was opened at 2007-05-04 13:17
Message generated for change (Comment added) made by jsafranek
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=312694&aid=1712645&group_id=12694

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 6
Private: No
Submitted By: Jan Safranek (jsafranek)
Assigned to: Robert Story (rstory)
Summary: meaningful log message on duplicate IP address

Initial Comment:
patch for bug #1693039 - snmpd now prints "Duplicate IP address detected, some \
interfaces may not be visible in IP-MIB" when an IP address is already known. And, \
most important, it displays the notice only once, not every 20 sec.

Please note that I have introduced new CONTAINER_TRY_INSERT function - it's not nice, \
but it works. Comments are welcome.

Patch is for ver. 5.3.1

----------------------------------------------------------------------

> Comment By: Jan Safranek (jsafranek)
Date: 2007-10-15 10:28

Message:
Logged In: YES 
user_id=1784238
Originator: YES

File Added: net-snmp-head-shared-ip-4.patch

----------------------------------------------------------------------

Comment By: Jan Safranek (jsafranek)
Date: 2007-10-15 10:28

Message:
Logged In: YES 
user_id=1784238
Originator: YES

Oh well, never send a patch on Friday :). I am attaching fixed version:

- use correct type when searching container for possible duplicities
- check compilation on 5.3, 5.4 and HEAD branches

The patch for 5.3 works also on 5.4 branch.
File Added: net-snmp-5.3-shared-ip-4.patch

----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2007-10-14 23:41

Message:
Logged In: YES 
user_id=848638
Originator: NO

Also, the patch triggers the following compiler warning all over the
place:

../../include/net-snmp/library/container.h: In function
'CONTAINER_INSERT':
../../include/net-snmp/library/container.h:397: warning: assignment makes
integer from pointer without a cast

line 397 in trunk is:

                rc2 = x->find(x,k);

Please address (and use the CONTAINER_FIND macro).

----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2007-10-14 23:11

Message:
Logged In: YES 
user_id=848638
Originator: NO

The patch against 5.3.1 is reported as malformed for me:

patch -p0 < net-snmp-5.3.1-shared-ip-3.patch
...
patching file agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
patch: **** malformed patch at line 264:      fclose(in);

Can you please double-check/update the patch?

Also, is the HEAD patch supposed to apply cleanly to the 5.4.x and 5.3.x
SVN branches, too?

----------------------------------------------------------------------

Comment By: Jan Safranek (jsafranek)
Date: 2007-10-12 14:06

Message:
Logged In: YES 
user_id=1784238
Originator: YES

File Added: net-snmp-head-shared-ip-3.patch

----------------------------------------------------------------------

Comment By: Jan Safranek (jsafranek)
Date: 2007-10-12 14:05

Message:
Logged In: YES 
user_id=1784238
Originator: YES

I fixed the patches so _netsnmp_ioctl_ipaddress_container_load_v4 and
_load6 do not propagate error code from CONTAINER_INSERT in certain
situations.
File Added: net-snmp-5.3.1-shared-ip-3.patch

----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2007-09-20 23:41

Message:
Logged In: YES 
user_id=848638
Originator: NO

@rstory: any objections to finally apply the patch? 
File Added: net-snmp-5.4.1-ip-2.patch

----------------------------------------------------------------------

Comment By: Shaper super-script (avengerx2)
Date: 2007-08-08 08:40

Message:
Logged In: YES 
user_id=1084384
Originator: NO

I've ported this patch to 5.4.1. Anyone who wishes it:
ftp://avenger.us.to/pub/patches/net-snmp-5.4.1-ip-2.patch

btw, no problem if one upload this patch to this section :) I just don't
think I myself can do it.

----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2007-06-04 10:25

Message:
Logged In: YES 
user_id=848638
Originator: NO

Thanks, Jan.
@rstory: can we get this into 5.4.1, preferrably before rc1?

----------------------------------------------------------------------

Comment By: Jan Safranek (jsafranek)
Date: 2007-06-04 10:17

Message:
Logged In: YES 
user_id=1784238
Originator: YES

File Added: net-snmp-head-shared-ip-2.patch

----------------------------------------------------------------------

Comment By: Jan Safranek (jsafranek)
Date: 2007-06-04 10:17

Message:
Logged In: YES 
user_id=1784238
Originator: YES

1) thanks
2) I was simply afraid to modify the function which is used everywhere - I
am not able to judge all consequences.
3-5) ok
6) I do not think this is necessary - without the flag (=now), having
container with two indexes and the CONTAINER_INSERT failing on duplicity of
the second index, you have the entry in first index only. That means that
the entry is not visible if you use the second index for lookup, which is
IMHO inconsistent and will lead to memory leaks or segfaults. I would
suggest to check for duplicities in any case (respecting
CONTAINER_KEY_ALLOW_DUPLICATES) and do not allow the INSERT if it would
fail.

I attached new patches - both for HEAD and 5.3.1:
net-snmp-5.3.1-shared-ip-2.patch, net-snmp-head-shared-ip-2.patch. 

Again, I kindly ask for review. I aggressively modified CONTAINER_INSERT
and added new flag - CONTAINER_SILENT, making CONTAINER_INSERT to shut up
on error. I modified ipaddress_common.c to set the flag (although I am not
100% sure I found the right place to set it) and tweaked
container_binary_array to support flags.
File Added: net-snmp-5.3.1-shared-ip-2.patch

----------------------------------------------------------------------

Comment By: Robert Story (rstory)
Date: 2007-05-29 14:19

Message:
Logged In: YES 
user_id=76148
Originator: NO

My thoughts..

1) I like it too
2) Why not just modify CONTAINER_INSERT?
3) Container options should be taken into account. eg the find checks
should be ignored if CONTAINER_KEY_ALLOW_DUPLICATES option is set.
4) 5.3.x and later have an otions function to access options. 5.2.x does
not.
5) the find can also be skipped if, after the rewind to the first
container, x->next is NULL.
6) I'd also suggest a new option, say CONTAINER_KEY_ALL_OR_NONE, so that
the check is only done when the flag is set.
7) Hmmmmm. But options are, so far, used to influence internal container
operation, and this is for behaviour external to an individual container.
So, the real container solution is probably to eliminate the whole idea of
a linked list of containers, and instead introduce a 'container container'
to handle multiple containers. This is obviously not doable for 5.4.x and
earlier, but would work for main. It would simplify the CONTAINER_*
macros...

Anyways, I suggest that 2-6 be implemented, and we leave 5.2.x as WONT
FIX.

----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2007-05-18 20:10

Message:
Logged In: YES 
user_id=848638
Originator: NO

I'd certainly support to apply this to the affected branches as well.

----------------------------------------------------------------------

Comment By: Wes Hardaker (hardaker)
Date: 2007-05-18 19:42

Message:
Logged In: YES 
user_id=76242
Originator: NO

Thouhghts on this:

1) I like it.
2) It walks the line of new feature vs bug and I'm not sure where it
should get applied outside of trunk.  Comments from others appreciated.
3) doesn't currently apply cleanly to trunk, but easy to fix I'm sure.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=312694&aid=1712645&group_id=12694

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-patches mailing list
Net-snmp-patches@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-patches


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic