projects
/
pxelator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34ecddf
)
correctly pack/unpack into 32-bit number for marking etc.
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 27 Aug 2009 19:58:56 +0000
(19:58 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 27 Aug 2009 19:58:56 +0000
(19:58 +0000)
lib/PXElator/ip.pm
patch
|
blob
|
history
diff --git
a/lib/PXElator/ip.pm
b/lib/PXElator/ip.pm
index
18eb1aa
..
4b32178
100644
(file)
--- a/
lib/PXElator/ip.pm
+++ b/
lib/PXElator/ip.pm
@@
-111,11
+111,11
@@
sub default_route_dev {
}
sub to_int {
-
pack( 'C*', split(/\./, shift
) )
+
unpack( 'N', pack( 'C*', split(/\./, shift)
) )
}
sub from_int {
- join( '.', unpack('C4',
shift
) )
+ join( '.', unpack('C4',
pack('N',shift)
) )
}
1;