[packages/perl-NetPacket] - fix ethernet addresses handling

adwol adwol at pld-linux.org
Sun Oct 7 15:36:30 CEST 2018


commit 53cca5c18c49a07ecca466cc5b7ae10abb72ae55
Author: Adam Osuchowski <adwol at pld-linux.org>
Date:   Sun Oct 7 15:34:04 2018 +0200

    - fix ethernet addresses handling

 perl-NetPacket-ethernet.patch | 14 ++++++++++++++
 perl-NetPacket.spec           |  2 ++
 2 files changed, 16 insertions(+)
---
diff --git a/perl-NetPacket.spec b/perl-NetPacket.spec
index aeb352c..ceb3328 100644
--- a/perl-NetPacket.spec
+++ b/perl-NetPacket.spec
@@ -9,6 +9,7 @@ License:	Artistic
 Group:		Development/Languages/Perl
 Source0:	http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{version}.tar.gz
 # Source0-md5:	17ba0407dada096f046f513387e88818
+Patch0:		%{name}-ethernet.patch
 URL:		http://search.cpan.org/dist/NetPacket/
 BuildRequires:	perl-devel >= 1:5.8.0
 BuildRequires:	rpm-perlprov >= 4.1-13
@@ -35,6 +36,7 @@ nie dokończone).
 
 %prep
 %setup -q -n %{pdir}-%{version}
+%patch0 -p1
 
 %build
 %{__perl} Makefile.PL \
diff --git a/perl-NetPacket-ethernet.patch b/perl-NetPacket-ethernet.patch
new file mode 100644
index 0000000..8ed9ad1
--- /dev/null
+++ b/perl-NetPacket-ethernet.patch
@@ -0,0 +1,14 @@
+diff -ruN NetPacket-1.6.0.orig/lib/NetPacket/Ethernet.pm NetPacket-1.6.0/lib/NetPacket/Ethernet.pm
+--- NetPacket-1.6.0.orig/lib/NetPacket/Ethernet.pm	2015-03-13 23:20:07.000000000 +0100
++++ NetPacket-1.6.0/lib/NetPacket/Ethernet.pm	2018-10-07 15:31:17.126294738 +0200
+@@ -127,8 +127,8 @@
+ sub encode {
+     my ($self) = shift; 
+ 
+-    (my $dest = $self->{src_mac}) =~ s/://g;
+-    (my $src = $self->{dest_mac}) =~ s/://g;
++    (my $src = $self->{src_mac}) =~ s/://g;
++    (my $dest = $self->{dest_mac}) =~ s/://g;
+ 
+     my $frame = pack('H12H12n a*', $dest, $src, 0x0800, $self->{data});
+     return $frame;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-NetPacket.git/commitdiff/53cca5c18c49a07ecca466cc5b7ae10abb72ae55



More information about the pld-cvs-commit mailing list