Subject: | payload not packed properly |
Date: | Wed, 04 Nov 2009 13:18:19 -0500 |
To: | bug-Net-Packet [...] rt.cpan.org. |
From: | Daniel Higgins <danielh [...] e2eresolutions.com> |
when using net::packet::pppoe to make a pppoe packet. the payload part
is not packed into the packet, preventing the use of TAGs as required by
the rfc
the following patch adds it to the packet.
======================
--- a/Net/Packet/PPPoE.pm 2006-11-23 17:52:16.000000000 -0500
+++ b/Net/Packet/PPPoE.pm 2009-11-04 13:03:44.000000000 -0500
@@ -47,12 +47,13 @@
my $type = Bit::Vector->new_Dec(4, $self->[$__type]);
my $v8 = $version->Concat_List($type);
- $self->[$__raw] = $self->SUPER::pack('CCnnn',
+ $self->[$__raw] = $self->SUPER::pack('CCnnna*',
$v8->to_Dec,
$self->[$__code],
$self->[$__sessionId],
$self->[$__payloadLength],
$self->[$__pppProtocol],
+ $self->[$__payload],
) or return undef;
1;
======================
--
Daniel Higgins
Technical Representative
E2E Resolutions Inc.
Phone: +1 (450) 926-8497 x2239
E-Mail: daniel.higgins@e2eresolutions.com
web : http://www.e2eresolutions.com/