From 11b3811f831d037589b32b63a70f17bbb81eea54 Mon Sep 17 00:00:00 2001 From: bluhm Date: Thu, 22 Jun 2017 20:17:22 +0000 Subject: [PATCH] Perl on 32 bit architectures does not support pack('Q'), replace it with 'NN'. --- regress/usr.sbin/switchd/OFP.pm | 6 +++--- regress/usr.sbin/switchd/run.pl | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/regress/usr.sbin/switchd/OFP.pm b/regress/usr.sbin/switchd/OFP.pm index fde9b2d0f46..be6112a3e24 100644 --- a/regress/usr.sbin/switchd/OFP.pm +++ b/regress/usr.sbin/switchd/OFP.pm @@ -258,12 +258,12 @@ sub ofp_table_features_reply { # # Finish # - $tf_header = pack('nCx[5]a[32]QQNN', + $tf_header = pack('nCx[5]a[32]NNNNNN', 64 + length($tf_payload), # length 0, # tableid 'start', # name - 0x0000000000000000, # metadata_match - 0x0000000000000000, # metadata_write + 0x00000000, 0x00000000, # metadata_match + 0x00000000, 0x00000000, # metadata_write 0x00000000, # config 10000 # max_entries ); diff --git a/regress/usr.sbin/switchd/run.pl b/regress/usr.sbin/switchd/run.pl index 665650422ef..fbc045e9a89 100644 --- a/regress/usr.sbin/switchd/run.pl +++ b/regress/usr.sbin/switchd/run.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: run.pl,v 1.10 2017/06/22 20:06:14 bluhm Exp $ +# $OpenBSD: run.pl,v 1.11 2017/06/22 20:17:22 bluhm Exp $ # Copyright (c) 2017 Alexander Bluhm # Copyright (c) 2016 Reyk Floeter @@ -134,8 +134,8 @@ sub ofp_hello { $pkt->{version} = $self->{version}; $pkt->{type} = OFP_T_FEATURES_REPLY(); $pkt->{xid} = $features->{xid}; - $pkt->{data} = pack('QNCCxxNN', - 0xFFAABBCCDDEEFF, # datapath_id + $pkt->{data} = pack('NNNCCxxNN', + 0x00FFAABB, 0xCCDDEEFF, # datapath_id 0, # nbuffers 1, # ntables 0, # aux_id @@ -184,12 +184,12 @@ sub ofp_packet_in { $match .= pack("x[$padding]"); } - $pkt = pack('NnCCQnna*xxa*', + $pkt = pack('NnCCNNnna*xxa*', OFP_PKTOUT_NO_BUFFER(), # buffer_id length($data), # total_len OFP_PKTIN_REASON_NO_MATCH(), # reason 0, # table_id - 0x0000000000000000, # cookie + 0x00000000, 0x00000000, # cookie OFP_MATCH_OXM(), # match_type $matchlen, # match_len $match, # OXM matches -- 2.20.1