Update the implementation based on saylenty's suggestion.
Update the implementation based on saylenty's suggestion.

lkash/test,jameslittle/dpkt,yangbh/dpkt,bpanneton/dpkt,jack8daniels2/dpkt,hexcap/dpkt,smutt/dpkt