[Click] StoreIPAddress not 64bit safe

Eddie Kohler kohler at cs.ucla.edu
Sun Nov 15 18:32:08 EST 2009


Ouch, thanks!  A version of this patch is applied -- it actually goes ahead 
and makes _offset an integer variable.

E


Harald Schioeberg wrote:
> -----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-----
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list