Commit b8cfb1d3 authored by garciay's avatar garciay
Browse files

Bug fixed on GN layer in case of G5 messages with extra trailing bytes at the end of the message

parent 03cf2f24
......@@ -361,14 +361,22 @@ public class GnLayer extends Layer implements Runnable, IEthernetSpecific {
else {
// Other messages
if(payloadLength > 0) {
byte[] payload = new byte[payloadLength];
System.arraycopy(message, message.length - payloadLength, payload, 0, payloadLength);
byte[] mpayload = new byte[payloadLength];
int extendedHeader = 0;
if (headerType == 1) { // Beacon
extendedHeader = 24;
} else if (headerType == 4) { // Geo Broadcast
extendedHeader = 44;
} else if (headerType == 5) { // Topology-Scoped Broadcast
extendedHeader = 28;
} // TODO To be continued
System.arraycopy(message, basicHdr.length + commonHdr.length + extendedHeader, mpayload, 0, payloadLength);
lowerInfo.put(GN_NEXTHEADER, nextHeader);
lowerInfo.put(GN_TYPE, headerType);
lowerInfo.put(GN_SUBTYPE, headerSubType);
lowerInfo.put(GN_LIFETIME, lifetime);
lowerInfo.put(GN_TRAFFICCLASS, trafficClass);
super.receive(payload, lowerInfo);
super.receive(mpayload, lowerInfo);
}
}
// Security disable, null will be translated into omit
......
# Debug level - Authorized values: OFF, ALL, INFO, SEVERE
DEBUG_ENABLED=OFF
DEBUG_ENABLED=ALL
# Define the port/layer configuration for CAM
camPort=BTP/GN/ETH
#camPort=BTP/GN/CSG
......@@ -29,8 +29,9 @@ ipv6OverGeoNetworkingPort=Debug
#fsapPort=FSAP/UdpIp
#fsapPort=FSAP/UdpIp
#UpperTesterSettings=192.168.42.1:12345
UpperTesterSettings=10.200.1.102:12345
#UpperTesterSettings=192.168.1.53:12345
#ConfigTesterSettings=192.168.1.53:12346
UpperTesterSettings=10.200.1.101:12345
ConfigTesterSettings=10.200.1.102:12346
# Peer ITS station
......@@ -40,16 +41,16 @@ ConfigTesterSettings=10.200.1.102:12346
# Home laptop VMWare MAC address
#LocalEthernetMAC=005056C00008
# Home laptop MAC address
#LocalEthernetMAC=4C80938EDB27
#LocalEthernetMAC=DC536045AF7E
# ETSI computer MAC address
#LocalEthernetMAC=0022191B7FDB
# G5 bridge connected on USB3/Ethernet
LocalEthernetMAC=00E08F008855
# Post-mortem ATS execution mode
OfflineMode=false
PcapFile=pcap/vendor/TC_CAM_MSD_FMT_BV_01.pcap
PcapFile=pcap/vendor/Livorno 20160914-2 DENM Full packet.pcap
# Start at time in seconds since 1970-01-01, e.g. 1421661427.233361
OffsetTime=1421661427.233361
OffsetTime=0
# Define the Ethernet type value used by the IUT
IutEthernetTypeValue=0x8947
# Node Ethernet addresses
......@@ -62,6 +63,18 @@ LinkLayer_NodeB=8BADF00D0102
LinkLayer_NodeC=8BADF00D0103
# Link-Layer address of component NodeD
LinkLayer_NodeD=8BADF00D0104
# Link-Layer address of component NodeE
LinkLayer_NodeE=8BADF00D0105
# Link-Layer address of component NodeF
LinkLayer_NodeF=8BADF00D0106
# Link-Layer address of component NodeG
LinkLayer_NodeG=8BADF00D0107
# Link-Layer address of component NodeH
LinkLayer_NodeH=8BADF00D0108
# Link-Layer address of component NodeI
LinkLayer_NodeI=8BADF00D0109
# Link-Layer address of component NodeJ
LinkLayer_NodeJ=8BADF00D010A
# Interval between each beacon sent by TS (ms)
TsBeaconInterval=1000
# Latitude of Test System
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment