lemontree55 / packetgen

Ruby library to easily generate and capture network packets
MIT License
98 stars 13 forks source link

fix typo #102

Closed picatz closed 6 years ago

picatz commented 6 years ago

I stumbled across a 🐛 bug while trying to re-create this.

Steps to Reproduce Error

require "packetgen"

PacketGen.parse("G\x00\x00X\x00\x01\x00\x00@\x06Y{\n\x00\x00\x10\x08\x08\x08\x08AAAAAAAA\x00\x14\t\x13\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x02\x00'\xcd\x00\x00\x13\x14111111111111111111\x13\x14222222222222222222")
NameError: uninitialized constant PacketGen::Header::TCP::Options::OPtion
Did you mean?  PacketGen::Header::TCP::Option
               PacketGen::Header::TCP::Options
from .../gems/packetgen-3.0.1/lib/packetgen/header/tcp/options.rb:51:in `real_type'

Fix

The fix is simple: OPtion -> Option

🙇 Thank you again for all your work @sdaubert!

sdaubert commented 6 years ago

Thank you @picatz !