[Click] AddressInfo on Click 2.0

Sascha Alexander Jopen jopen at informatik.uni-bonn.de
Thu Aug 25 07:35:06 EDT 2011


Hey,

does anybody use the AddressInfo element with click 2.0 and real device
names, instead of supplying IP addresses directly?

If i use AddressInfo(deviceName wlan0:ip wlan0:eth) for example, i get
the following error: "wlan0:ip" is not a recognizable address.

Either i use AddressInfo in a wrong way, or this is an error. If i use
it wrong, maybe someone could tell me the right way?

It seems, this error is caused by a check within the IPPrefixArg and
IPAddressArg parsers, which check for a non-null ArgContext. When
resolving the ip address of such an interface, there is no underlying
click element, thus the context is null and the ip is never fetched from
the interface. Removing this check seems to fix the problem, but i don't
know, if this can lead to access violations later on. The check should
be there for a good reason.

The attached patch "fixes" this problem by simply removing those checks.
Probably some more work has to be done to make this robust.

Regards,
Sascha Jopen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AddressInfo.patch
Type: text/x-patch
Size: 2090 bytes
Desc: not available
Url : http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20110825/0f331df2/attachment.bin 


More information about the click mailing list