Forum Discussion

Tony___Keith_93's avatar
Tony___Keith_93
Icon for Nimbostratus rankNimbostratus
Oct 10, 2005

Help with get_netmask

I'm reposting this question to the proper forum. (It was originally mistakenly posted to Forums > iRules > v4.x)

 

 

The BIP-IP device that I'm working with is using 4.5.11 firmware.

 

 

I’m having a problem with the get_netmask method within the SelfIP interface.

 

 

I’m using the following code:

 

 

//The following three lines work fine

 

 

string[] str_iplist = iSelfIP.get_list();

 

string str_IP = "ip: " + str_iplist[0];

 

string str_VlanName = "Name: " + iSelfIP.get_vlan(str_iplist[0]);

 

 

//The next line produces an error:

 

 

long l_IPMask = iSelfIP.get_netmask(str_iplist[0]); //errors

 

 

Error

 

 

An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll

 

 

Additional information: There is an error in XML document (12, 42).

 

 

 

Does anyone have any ideas?

 

 

Thanks,

 

 

Tony

 

 

 

 

 

5 Replies

  • Tony,

     

     

    The only issue I know of is the one described below. It's basically a bug in Apache's Keep-Alive code and it only shows itself with .NET iControl clients.

     

     

    It's described in detail in this thread:

     

     

    http://devcentral.f5.com/Default.aspx?tabid=28&view=topic&forumid=2&postid=4098

     

    Click here

     

     

    -Joe
  • Hi Joe,

     

     

    Thanks for the reply.

     

     

    I took a look at the link that you provided and saw that the user was having authentication problems, and also a problem with the get_virtual_address_list() method (due to an error in an earlier version of the wsdl file).

     

     

    The link suggests a work around to the authentication problem would be to change the httpd.conf file KeepAlive value from On to Off.

     

     

    In my case authentication and the get_virtual_address_list() method are working fine, but I thought I’d give the work around a try anyway to see if it might address my problem with the get_netmask method as well.

     

     

    Unfortunately the change did not make any difference and I’m still getting the same error.

     

     

    Do you have any other ideas that might help?

     

     

    Thanks,

     

     

    Tony

     

  • I think I found the problem. the get_netmask() method should return a string, not a long. Which version of the SDK are you using? This was a known issue that I thought was addressed in the 4.6.2 SDK but this one method could have slipped through the cracks.

     

     

    If we are returning back a string and your app expects a long, then that would cause the error you are seeing.

     

     

    Let me know which SDK version you are using and I can get you an updated set of WSDL files to plug into your app to see if that corrects the issue.

     

     

    -Joe
  • Hi Joe,

     

     

    I'm using version 4.6.3 of the SDK.

     

     

    I modified the WSDL file myself and changed the return value for the get_netmask() method to be a string, and now it is working as expected!

     

     

    You may want to get this fix into the SDK so that others don't run into the same problem.

     

     

    Thanks so much for all your help!

     

     

    Tony
  • Great! I'll make sure that the SDK is updated with the patched WSDL files. Thanks for bringing this to our attention.

     

     

    -Joe