Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-12-10 Thread zhuyj
On 12/02/2013 12:53 AM, Magnus Fromreide wrote: > On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: >>> On Tue, 2013-11-26 at 11:05 +0800, yzhu1 wrote: Hi, Magnus Follow your advice, I made the 3 new patches. Now the patches are in the

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-12-09 Thread zhuyj
Hi Any update? Zhu Yanjun On 12/04/2013 04:48 PM, yzhu1 wrote: > On 12/02/2013 12:53 AM, Magnus Fromreide wrote: >> On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >>> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: On Tue, 2013-11-26 at 11:05 +0800, yzhu1 wrote: > Hi, Magnus > >

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-12-06 Thread zhuyj
Hi, maintainers Any update about these patches? Zhu Yanjun On 12/04/2013 04:48 PM, yzhu1 wrote: > On 12/02/2013 12:53 AM, Magnus Fromreide wrote: >> On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >>> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: On Tue, 2013-11-26 at 11:05 +0800, yzhu1 w

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-12-04 Thread zhuyj
Hi, maintainers Any update about these patches? Zhu Yanjun On 12/04/2013 04:48 PM, yzhu1 wrote: > On 12/02/2013 12:53 AM, Magnus Fromreide wrote: >> On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >>> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: On Tue, 2013-11-26 at 11:05 +0800, yzhu1 w

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-12-02 Thread zhuyj
On 12/02/2013 12:53 AM, Magnus Fromreide wrote: > On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: >>> On Tue, 2013-11-26 at 11:05 +0800, yzhu1 wrote: Hi, Magnus Follow your advice, I made the 3 new patches. Now the patches are in the

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-12-01 Thread Magnus Fromreide
On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: > On 11/26/2013 02:58 PM, Magnus Fromreide wrote: > > On Tue, 2013-11-26 at 11:05 +0800, yzhu1 wrote: > >> Hi, Magnus > >> > >> Follow your advice, I made the 3 new patches. Now the patches are in the > >> attachment. Please check them. > >> Thanks a

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-28 Thread zhuyj
Hi, Magnus In agent/mibgroup/target/snmpTargetAddrEntry.c:832 if (temp_struct->params == NULL) ... *var_len = temp_struct->paramsLen; Since params may have NUL, it is not appropriate to use params to get the length of string. Now I made a new patch in the attachment. Please check it. Thanks

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-28 Thread zhuyj
Hi, Magnus In some log, I replace nameData with the hex string of nameData. Maybe the log file can look better. The patch is in the attachment. Please check it. Best Regards! Zhu Yanjun On 11/28/2013 02:55 PM, zhuyj wrote: On 11/26/2013 02:52 PM, Magnus Fromreide wrote: On Mon, 2013-11-25 at 1

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-27 Thread zhuyj
On 11/26/2013 02:52 PM, Magnus Fromreide wrote: On Mon, 2013-11-25 at 19:04 +0800, zhuyj wrote: On 11/25/2013 02:34 AM, Magnus Fromreide wrote: On Fri, 2013-11-22 at 14:27 +0800, zhuyj wrote: 4.patch -p1 < V5-7-patches-snmpTargetParam_support_zero_OID.patch snmpTargetAddrEntry.c: Chunk #2 is

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-26 Thread zhuyj
On 11/26/2013 02:52 PM, Magnus Fromreide wrote: > On Mon, 2013-11-25 at 19:04 +0800, zhuyj wrote: >> On 11/25/2013 02:34 AM, Magnus Fromreide wrote: >>> On Fri, 2013-11-22 at 14:27 +0800, zhuyj wrote: 4.patch -p1 < V5-7-patches-snmpTargetParam_support_zero_OID.patch >>> snmpTargetAddrEntry.c:

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-25 Thread Magnus Fromreide
On Tue, 2013-11-26 at 11:05 +0800, yzhu1 wrote: > > Hi, Magnus > > Follow your advice, I made the 3 new patches. Now the patches are in the > attachment. Please check them. > Thanks a lot. Are that really the new patches? It seems all the issues I spoke about are still present. /MF -

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-25 Thread Magnus Fromreide
On Mon, 2013-11-25 at 19:04 +0800, zhuyj wrote: > On 11/25/2013 02:34 AM, Magnus Fromreide wrote: > > On Fri, 2013-11-22 at 14:27 +0800, zhuyj wrote: > > > > > > 4.patch -p1 < V5-7-patches-snmpTargetParam_support_zero_OID.patch > > snmpTargetAddrEntry.c: > > Chunk #2 is unnecessary - setting membe

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-25 Thread zhuyj
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 no

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-25 Thread zhuyj
On 11/23/2013 09:03 PM, Bart Van Assche wrote: > On 11/22/13 07:27, zhuyj wrote: >> I prepared 3 patches based on V5-7-branch. > In the Net-SNMP project backwards compatibility is considered very > important. I think the patch "V5-7-patches-conf-support.patch" changes > snmpd_parse_config_targetAdd

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-24 Thread Magnus Fromreide
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 wel

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-23 Thread Bart Van Assche
On 11/22/13 07:27, zhuyj wrote: > I prepared 3 patches based on V5-7-branch. In the Net-SNMP project backwards compatibility is considered very important. I think the patch "V5-7-patches-conf-support.patch" changes snmpd_parse_config_targetAddr() such that the target address entry in the config fi

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-21 Thread zhuyj
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 fr

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-21 Thread zhuyj
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 mast

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-21 Thread zhuyj
On 11/21/2013 10:41 PM, zhuyj wrote: On 11/18/2013 07:08 PM, Bart Van Assche wrote: On 11/18/13 11:48, zhuyj wrote: On 09/10/2013 01:41 PM, Bart Van Assche wrote: On 09/10/13 04:04, zhuyj wrote: Please help me to merge this patch into trunk. Thanks a lot. Hello Zhu, The code in snmpd_parse_

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-21 Thread zhuyj
On 11/18/2013 07:08 PM, Bart Van Assche wrote: On 11/18/13 11:48, zhuyj wrote: On 09/10/2013 01:41 PM, Bart Van Assche wrote: On 09/10/13 04:04, zhuyj wrote: Please help me to merge this patch into trunk. Thanks a lot. Hello Zhu, The code in snmpd_parse_config_targetAddr() and store_snmpTarg

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-21 Thread Bart Van Assche
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 atta

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-18 Thread Bart Van Assche
On 11/18/13 11:48, zhuyj wrote: > On 09/10/2013 01:41 PM, Bart Van Assche wrote: >> On 09/10/13 04:04, zhuyj wrote: >>> Please help me to merge this patch into trunk. Thanks a lot. >> >> Hello Zhu, >> >> The code in snmpd_parse_config_targetAddr() and >> store_snmpTargetAddrEntry() assumes that tar

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-11-18 Thread zhuyj
On 09/10/2013 01:41 PM, Bart Van Assche wrote: > On 09/10/13 04:04, zhuyj wrote: >> Please help me to merge this patch into trunk. Thanks a lot. > > Hello Zhu, > > The code in snmpd_parse_config_targetAddr() and > store_snmpTargetAddrEntry() assumes that targetAddTable_struct.params > is an ASCII

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-10-16 Thread zhuyj
On 08/19/2013 12:58 PM, zhuyj wrote: Hi, I run the following commands: --snmpset -c NETMAN -v 2c 128.224.162.243 SNMP-TARGET-MIB::snmpTargetParamsRowStatus.0.25 i 5 SNMP-TARGET-MIB::snmpTargetParamsRowStatus.'..' = INTEGER: createAndWait(5) --snmpget -c NETMAN -v 2c 128.224.162.243 SNMP-TA

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-09-09 Thread Bart Van Assche
On 09/10/13 04:04, zhuyj wrote: > Please help me to merge this patch into trunk. Thanks a lot. Hello Zhu, The code in snmpd_parse_config_targetAddr() and store_snmpTargetAddrEntry() assumes that targetAddTable_struct.params is an ASCII string that does *not* contain an ASCII '\0' nor any ASCII

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-09-09 Thread zhuyj
Hi, Magnus Please help me to merge this patch into trunk. Thanks a lot. Best Regards! Zhu Yanjun On 08/19/2013 12:58 PM, zhuyj wrote: > Hi, > > I run the following commands: > > --snmpset -c NETMAN -v 2c 128.224.162.243 > SNMP-TARGET-MIB::snmpTargetParamsRowStatus.0.25 i 5 > SNMP-TARGET-MIB::sn

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-08-22 Thread zhuyj
Hi, Any update? Best Regards! zhuyj On 08/20/2013 10:23 AM, zhuyj wrote: > Hi, maintainers > > Would you like to comment on this patch? Thanks a lot. > > Best Regards! > zhuyj > On 08/19/2013 03:30 PM, zhuyj wrote: >> Hi, maintainers >> >> This patch is similar with snmpTargetAddr patch. Would y

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-08-19 Thread zhuyj
Hi, maintainers Would you like to comment on this patch? Thanks a lot. Best Regards! zhuyj On 08/19/2013 03:30 PM, zhuyj wrote: > Hi, maintainers > > This patch is similar with snmpTargetAddr patch. Would you like to > merge this patch into trunk? > > Best Regards! > zhuyj > On 08/19/2013 12:58

Re: net-snmp fails to create entries with a zero in the OID in SnmpTargetParamsEntry

2013-08-19 Thread zhuyj
Hi, maintainers This patch is similar with snmpTargetAddr patch. Would you like to merge this patch into trunk? Best Regards! zhuyj On 08/19/2013 12:58 PM, zhuyj wrote: > Hi, > > I run the following commands: > > --snmpset -c NETMAN -v 2c 128.224.162.243 > SNMP-TARGET-MIB::snmpTargetParamsRowSt

Re: net-snmp fails to create entries with a zero in the OID

2013-07-30 Thread Magnus Fromreide
On Wed, 2013-07-31 at 10:02 +0800, zhuyj wrote: > What can I do for you about this problem? I committed the partial patch a week ago (d833b0c8be) - could you please try the trunk or V5-7-patches version from git? /MF > Best Regards! > zhuyj > > On 07/22/2013 04:13 PM, zhuyj wrote: > > On 07/20/

Re: net-snmp fails to create entries with a zero in the OID

2013-07-30 Thread zhuyj
What can I do for you about this problem? Best Regards! zhuyj On 07/22/2013 04:13 PM, zhuyj wrote: > On 07/20/2013 06:49 PM, Magnus Fromreide wrote: >> On Fri, 2013-07-19 at 16:09 +0800, zhuyj wrote: >>> Would you like to give me some advice to make this patch better? >> I could do a partial comm

Re: net-snmp fails to create entries with a zero in the OID

2013-07-22 Thread zhuyj
On 07/20/2013 06:49 PM, Magnus Fromreide wrote: > On Fri, 2013-07-19 at 16:09 +0800, zhuyj wrote: >> Would you like to give me some advice to make this patch better? > I could do a partial commit of a corrected patch that covers the indices > in snmpTargetAddrTable right now, but that leaves snmpTa

Re: net-snmp fails to create entries with a zero in the OID

2013-07-21 Thread zhuyj
On 07/20/2013 06:49 PM, Magnus Fromreide wrote: > On Fri, 2013-07-19 at 16:09 +0800, zhuyj wrote: >> Would you like to give me some advice to make this patch better? > I could do a partial commit of a corrected patch that covers the indices > in snmpTargetAddrTable right now, but that leaves snmpTa

Re: net-snmp fails to create entries with a zero in the OID

2013-07-20 Thread Magnus Fromreide
On Fri, 2013-07-19 at 16:09 +0800, zhuyj wrote: > Would you like to give me some advice to make this patch better? I could do a partial commit of a corrected patch that covers the indices in snmpTargetAddrTable right now, but that leaves snmpTargetParamsTable still buggy and then I have to make it

Re: net-snmp fails to create entries with a zero in the OID

2013-07-19 Thread zhuyj
Would you like to give me some advice to make this patch better? On 07/16/2013 04:49 PM, zhuyj wrote: > Hi, Magnus > > Based on your patch, I made a new patch. This patch depends on > net-snmp5.7.2. > I made the following modifications compared with your patch: > 1.add strdup2 to replace strdup;

Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread Magnus Fromreide
On Tue, 2013-07-16 at 17:32 +0800, zhuyj wrote: > Hi, > > Please give some advice about this patch. Don't panic. I am looking at it. /MF > Thanks. > > Best Regards! > zhuyj > > On 07/16/2013 04:49 PM, zhuyj wrote: > > Hi, Magnus > > > > Based on your patch, I made a new patch. This patch dep

Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread zhuyj
Hi, This is the test result. Please advise. root@localhost:/etc/snmp> snmpset -v2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'..' = INTEGER: createAndWait(5) root@localhost:/etc/snmp> snmpset -v2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9.0.

Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread zhuyj
Any advice? On 07/16/2013 04:49 PM, zhuyj wrote: > Hi, Magnus > > Based on your patch, I made a new patch. This patch depends on > net-snmp5.7.2. > I made the following modifications compared with your patch: > 1.add strdup2 to replace strdup; > 2.modify addToList function; > 3.change some NUL-te

Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread zhuyj
Hi, Please give some advice about this patch. Thanks. Best Regards! zhuyj On 07/16/2013 04:49 PM, zhuyj wrote: > Hi, Magnus > > Based on your patch, I made a new patch. This patch depends on > net-snmp5.7.2. > I made the following modifications compared with your patch: > 1.add strdup2 to repla

Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread zhuyj
Hi, Magnus Based on your patch, I made a new patch. This patch depends on net-snmp5.7.2. I made the following modifications compared with your patch: 1.add strdup2 to replace strdup; 2.modify addToList function; 3.change some NUL-terminated strings to counted-strings, but not all; The patch is

Re: net-snmp fails to create entries with a zero in the OID

2013-07-15 Thread Magnus Fromreide
On Tue, 2013-07-16 at 10:27 +0800, zhuyj wrote: > Thanks for your help! > I agree with you. It is a big task to replace all the NUL-terminated > string with counted-string. > Now I have a patch that can fix this. Would you like to merge this > patch in master of net-snmp? If you send out the patch

Re: net-snmp fails to create entries with a zero in the OID

2013-07-15 Thread zhuyj
Thanks for your help! I agree with you. It is a big task to replace all the NUL-terminated string with counted-string. Now I have a patch that can fix this. Would you like to merge this patch in master of net-snmp? zhuyj On 07/15/2013 09:29 PM, Bill Fenner wrote: On Thu, Jul 11, 2013 at 6:39 A

Re: net-snmp fails to create entries with a zero in the OID

2013-07-15 Thread Bill Fenner
On Thu, Jul 11, 2013 at 6:39 AM, zhuyj wrote: > Hi, Magnus && Niels > > Thanks for your help! I am testing your patch. This patch can solve the > most problems. > But Ihave a question, is this a bug? I mean that '0' in snmpAdminString > is a bug, or not? > Would you like to discuss this with me?

Re: net-snmp fails to create entries with a zero in the OID

2013-07-11 Thread zhuyj
Hi, If I fix all the problems, do you want to merge this patch into master? zhuyj On 07/11/2013 05:29 PM, zhuyj wrote: > Hi, > something is wrong with these modifications. The root cause is that > strdup handles string as normal string. We should rewrite strdup > function. > > @@ -325,7 +326,8

Re: net-snmp fails to create entries with a zero in the OID

2013-07-11 Thread zhuyj
Hi, Magnus && Niels Thanks for your help! I am testing your patch. This patch can solve the most problems. But Ihave a question, is this a bug? I mean that '0' in snmpAdminString is a bug, or not? Would you like to discuss this with me? zhuyj On 07/10/2013 04:53 PM, Magnus Fromreide wrote: > On

Re: net-snmp fails to create entries with a zero in the OID

2013-07-11 Thread zhuyj
Hi, something is wrong with these modifications. The root cause is that strdup handles string as normal string. We should rewrite strdup function. @@ -325,7 +326,8 @@ notifyTable_register_notifications(int major, int minor, return 0; } ptr = snmpTargetAddrTable_create(); -

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread zhuyj
Hi, in snprintf, we do not consider that 0 is in nameData. strdup(cptr) does not include that 0 is in cptr. So we should rewrite this. @@ -372,7 +366,8 @@ snmpTargetAddr_addName(struct targetAddrTable_struct *entry, char *cptr) "ERROR snmpTargetAddrEntry: name out of

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread zhuyj
Hi name is .0.25.1, we can not snmpwalk it. But .3.25.1, we can snmpwalk it. Maybe it is related with 0. I will look into it. zhuyj user@ubuntu1004:~/net-snmp-5.7.2$ snmpset -v 2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9.3.25.1 i 5 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'...' = INTEGER: c

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread zhuyj
Hi, But snmpget can work well. user@ubuntu1004:~/net-snmp-5.7.2$ snmpget -v 2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9.0.25.1 -Ofn .1.3.6.1.6.3.12.1.2.1.9.0.25.1 = INTEGER: notReady(3) zhuyj On 07/10/2013 06:54 PM, zhuyj wrote: > Hi, > > After I applied this patch, the following is the test

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread zhuyj
Hi, After I applied this patch, the following is the test result. When we made the name bigger than 2, we can not snmpwalk it. I will look into it. Zhuyj user@ubuntu1004:~/net-snmp-5.7.2$ snmpwalk -v 2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9 -Ofn .1.3.6.1.6.3.12.1.2.1.9.0.25 = INTEGER: not

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread Niels Baggesen
On Wed, Jul 10, 2013 at 10:53:30AM +0200, Magnus Fromreide wrote: > A completely untested patch against master is attached. > > Does it help you? > > Note - the rename of name to nameData and get_addrForName to > get_addrForName2 was to make it easier to find unconverted code. You should probab

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread Magnus Fromreide
On Wed, 2013-07-10 at 17:41 +0800, zhuyj wrote: > On 07/10/2013 04:53 PM, Magnus Fromreide wrote: > > On Wed, 2013-07-10 at 10:34 +0800, zhuyj wrote: > >> Hi, > >> > >> Attempting to create a new entry with a zero index fails silently. > > Ok, You want to index your entry with the string . > > > >

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread zhuyj
On 07/10/2013 04:53 PM, Magnus Fromreide wrote: > On Wed, 2013-07-10 at 10:34 +0800, zhuyj wrote: >> Hi, >> >> Attempting to create a new entry with a zero index fails silently. > Ok, You want to index your entry with the string . > > The mess up is, just as usual, that people believes that is a >

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread zhuyj
On 07/10/2013 04:53 PM, Magnus Fromreide wrote: > On Wed, 2013-07-10 at 10:34 +0800, zhuyj wrote: >> Hi, >> >> Attempting to create a new entry with a zero index fails silently. > Ok, You want to index your entry with the string . > > The mess up is, just as usual, that people believes that is a >

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread zhuyj
OK. Thanks a lot. I will make tests about this. Zhuyj On 07/10/2013 04:53 PM, Magnus Fromreide wrote: > On Wed, 2013-07-10 at 10:34 +0800, zhuyj wrote: >> Hi, >> >> Attempting to create a new entry with a zero index fails silently. > Ok, You want to index your entry with the string . > > The mess

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread Magnus Fromreide
On Wed, 2013-07-10 at 10:34 +0800, zhuyj wrote: > Hi, > > Attempting to create a new entry with a zero index fails silently. Ok, You want to index your entry with the string . The mess up is, just as usual, that people believes that is a string terminator. That is wrong. Your idea of using \xf

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread zhuyj
On 07/10/2013 03:22 PM, zhuyj wrote: On 07/10/2013 02:04 PM, zhuyj wrote: On 07/10/2013 01:41 PM, Niels Baggesen wrote: On Wed, Jul 10, 2013 at 10:34:05AM +0800, zhuyj wrote: root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 SNMP-TARGET-MIB::snmpTarget

Re: net-snmp fails to create entries with a zero in the OID

2013-07-10 Thread zhuyj
On 07/10/2013 02:04 PM, zhuyj wrote: On 07/10/2013 01:41 PM, Niels Baggesen wrote: On Wed, Jul 10, 2013 at 10:34:05AM +0800, zhuyj wrote: root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'..' = INTEGER: createAn

Re: net-snmp fails to create entries with a zero in the OID

2013-07-09 Thread zhuyj
On 07/10/2013 01:41 PM, Niels Baggesen wrote: On Wed, Jul 10, 2013 at 10:34:05AM +0800, zhuyj wrote: root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'..' = INTEGER: createAndWait(5) root@localhost:/root> snmpget

Re: net-snmp fails to create entries with a zero in the OID

2013-07-09 Thread Niels Baggesen
On Wed, Jul 10, 2013 at 10:34:05AM +0800, zhuyj wrote: > root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 > .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 > SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'..' = INTEGER: createAndWait(5) > root@localhost:/root> snmpget -v 2c -c NETMAN 192.168.2.15 > .1.3.6.

Re: net-snmp fails to create entries with a zero in the OID

2013-07-09 Thread zhuyj
On 07/10/2013 01:35 PM, zhuyj wrote: > On 07/10/2013 10:44 AM, zhuyj wrote: >> On 07/10/2013 10:34 AM, zhuyj wrote: >>> Hi, >>> >>> Attempting to create a new entry with a zero index fails silently. >>> >>> root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 >>> .1.3.6.1.6.3.12.1.2.1.9.0.25

Re: net-snmp fails to create entries with a zero in the OID

2013-07-09 Thread zhuyj
On 07/10/2013 10:44 AM, zhuyj wrote: > On 07/10/2013 10:34 AM, zhuyj wrote: >> Hi, >> >> Attempting to create a new entry with a zero index fails silently. >> >> root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 >> .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 >> SNMP-TARGET-MIB::snmpTargetAddrRowStat

Re: net-snmp fails to create entries with a zero in the OID

2013-07-09 Thread zhuyj
On 07/10/2013 10:34 AM, zhuyj wrote: > Hi, > > Attempting to create a new entry with a zero index fails silently. > > root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 > .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 > SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'..' = INTEGER: createAndWait(5) > root@loc