On 11/25/2013 02:34 AM, Magnus Fromreide wrote:
On Fri, 2013-11-22 at 14:27 +0800, zhuyj wrote:
On 11/22/2013 10:54 AM, zhuyj wrote:
On 11/22/2013 02:45 AM, Bart Van Assche wrote:
On 10/16/13 10:31, zhuyj wrote:
If this patch is used in net-snmp-5.7.2, the following should be used,
too. If not, snmp-trap could not work well.
Hello Zhu,
Please make yourself familiar with git and start from the V5-7-patches
or master branch when preparing patches. The patch that was attached to
your e-mail doesn't apply on the V5-7-branch:
$ git checkout V5-7-patches
Switched to branch 'V5-7-patches'
Your branch is behind 'origin/V5-7-patches' by 2 commits, and can be
fast-forwarded.
(use "git pull" to update your local branch)
$ git rebase origin/V5-7-patches
First, rewinding head to replay your work on top of it...
Fast-forwarded V5-7-patches to origin/V5-7-patches.
$ git apply -p1 ~/net-snmp-5.7.2-fix-param-length.patch
error: patch failed: agent/mibgroup/notification/snmpNotifyTable.c:338
error: agent/mibgroup/notification/snmpNotifyTable.c: patch does not
apply
Bart.
Hi, Bart
Sorry. I prepared these patches based on net-snmp-5.7.2 release. I
will prepare these patches based on V5-7-branch.
Best Regards!
Zhu Yanjun
Hi, Bart
I prepared 3 patches based on V5-7-branch.
I made tests following these steps. It can apply well.
1.git clone git://git.code.sf.net/p/net-snmp/code
2.git checkout V5-7-patches
3.git pull
4.patch -p1 < V5-7-patches-snmpTargetParam_support_zero_OID.patch
snmpTargetAddrEntry.c:
Chunk #2 is unnecessary - setting members to 0 before freeing the
object they are members of.
snmpTargetAddrEntry.h:
Putting the variable in the hole after nameLen will leave the size of
targetAddrTable_struct unchanged while the suggested location will
expand the size of it by 4 (or 8 on 64-bit) bytes.
snmpTargetParamsEntry.c:
Chunk #2 is unnecessary - setting a member to 0 before freeing the
object it is a member of.
Chunk #9? (get_paramEntry) - it would be more efficient and correct
to check that nameLen == ptr->paramNameLen before memcmp'ing
name and paramName, in particular if nameLen < paramNameLen.
target.c:
Certificate lookup under DTLS uses only the part of the name up to the
first '\0'.
Hi, MF
I agree with other advices from you. But I do not understand this:
target.c:
Certificate lookup under DTLS uses only the part of the name up to the
first '\0'.
Would you like to explain this in details? Thanks a lot.
patch -p1 < V5-7-patches-fix-param-length.patch
patch -p1 < V5-7-patches-conf-support.patch
Why the memset's before read_config_save_octet_string?
An example is as below.
If variable tmp is used as the line1, there are 6 'x' in this variable tmp.
we will copy 4 'y' to tmp, now the variable tmp is as below line2 if we
do not
memset tmp. It is not what we expect.
line1: tmp: _xxxxxx___
line2: using: _yyyyxx
_Best Regards!
Zhu Yanjun
Note that I haven't checked if targetAddrs, targetParams and
snmpNotifyTag successfully persists, this is still left to do.
/MF
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders