From a0dc9ea83ab0a8c4202aeab1b98ecb2ffe4d0b38 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Thu, 5 Nov 2015 15:48:43 -0800 Subject: [PATCH] fix type mismatch and bounds checking --- src/internet/model/ip-l4-protocol.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/internet/model/ip-l4-protocol.cc b/src/internet/model/ip-l4-protocol.cc index 5fb3e2ef5..c956bdb7b 100644 --- a/src/internet/model/ip-l4-protocol.cc +++ b/src/internet/model/ip-l4-protocol.cc @@ -22,7 +22,7 @@ // George F. Riley, Georgia Tech, Spring 2007 #include "ip-l4-protocol.h" -#include "ns3/uinteger.h" +#include "ns3/integer.h" #include "ns3/log.h" namespace ns3 { @@ -38,9 +38,10 @@ IpL4Protocol::GetTypeId (void) .SetParent () .SetGroupName ("Internet") .AddAttribute ("ProtocolNumber", "The IP protocol number.", - UintegerValue (0), - MakeUintegerAccessor (&IpL4Protocol::GetProtocolNumber), - MakeUintegerChecker ()) + TypeId::ATTR_GET, + IntegerValue (0), + MakeIntegerAccessor (&IpL4Protocol::GetProtocolNumber), + MakeIntegerChecker (0,255)) ; return tid; }