net: reject Bootp/DHCP packets with bad OP value
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Thu, 27 Aug 2015 21:53:26 +0000 (23:53 +0200)
committerJoe Hershberger <joe.hershberger@ni.com>
Wed, 28 Oct 2015 19:54:19 +0000 (14:54 -0500)
commit867d6ae2c9cec6a0f6f3a7472cf8397693f6cc35
tree238c0d27100c8607d163908b8bec130e011beb50
parent829533287afbc2aff2b8c65eb0cbf8f8ee887ae2
net: reject Bootp/DHCP packets with bad OP value

Rename check_packet to check_reply_packet to make its function more
obvious.
The check for DHCP_* values is completely off, as it should
compare against DHCP option 53 (Message Type). Only valid value for
any Bootp/DHCP reply is BOOTREPLY.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
net/bootp.c