tbaschak / cisco-config-manager

This project provides tools to manage configurations for Cisco devices. Requires PHP5 and MySQL.
http://adis.ca/post/cisco-config-manager/
GNU General Public License v2.0
1 stars 0 forks source link

Reading Options isn't robust enough #1

Open tbaschak opened 10 years ago

tbaschak commented 10 years ago

The regexp which reads in the options fails when there is more than one set of options (as defined in rfc2347)

Here is a tftp request with blksize (and other options) set which currently fails.

03:01:34.461694 IP (tos 0x0, ttl 64, id 2019, offset 0, flags [none], proto UDP (17), length 94)
    192.168.203.4.31244 > 192.168.203.6.69: [udp sum ok]  66 WRQ "txt.txt" netascii tsize 26 blksize 1024 blksize2 2048 rollover 0
03:01:34.469349 IP (tos 0x0, ttl 64, id 32050, offset 0, flags [DF], proto UDP (17), length 54)
    192.168.203.6.50912 > 192.168.203.4.31244: [bad udp cksum 0x1790 -> 0x8e5f!] UDP, length 26
tbaschak commented 10 years ago

I've left a note on commit 689b924f74f0173c80f641cbbad3c7c07d5c0c54 on the line which contains the code which needs improving