[Click] StoreIPAddress not 64bit safe

Harald Schioeberg harald at net.t-labs.tu-berlin.de
Sun Nov 15 09:51:13 EST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


this segfaults on amd64 in StoreIPAddress::simple_action

RatedSource("some data", 1, 1, STOP true) ->
        UDPIPEncap(1.0.0.1, 1234, 2.0.0.2, 1234) ->
        StoreIPAddress(3.0.0.3, dst) ->
	CheckIPHeader ->      // verify that incremental csum still work
        IPPrint ->
        Discard ;


the attached patch makes the thing work as expected:

$ ./userlevel/click ./conf/storeip.click
1258295906.133130: 1.0.0.1.1234 > 3.0.0.3.1234: udp 17

	harald

ps. "_offset = (unsigned) -16" ... interesting magic ;-)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksAFWEACgkQy8wrZ9OvkU2bmwCgnootnZagzBTcZ2+uSWJ1pXLs
7kEAn0VrgtbM6S/9L/CxUQhCZwNZNdjT
=CvEk
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: storeip_64bit.patch
Type: text/x-patch
Size: 623 bytes
Desc: not available
Url : http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20091115/2a67c70c/attachment.bin 


More information about the click mailing list